From 0800a2d116d18dd6e8a9d915406a722fb9848f9e Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Wed, 11 Jul 2018 13:21:41 -0400 Subject: [PATCH 1/4] add basic typings for Flyout --- src/components/flyout/index.d.ts | 3 +++ src/components/index.d.ts | 1 + 2 files changed, 4 insertions(+) create mode 100644 src/components/flyout/index.d.ts diff --git a/src/components/flyout/index.d.ts b/src/components/flyout/index.d.ts new file mode 100644 index 00000000000..aa33540343b --- /dev/null +++ b/src/components/flyout/index.d.ts @@ -0,0 +1,3 @@ +declare module '@elastic/eui' { + export const EuiFlyout: React.SFC; +} \ No newline at end of file diff --git a/src/components/index.d.ts b/src/components/index.d.ts index f6eb23b62b7..082845d03d0 100644 --- a/src/components/index.d.ts +++ b/src/components/index.d.ts @@ -20,3 +20,4 @@ /// /// /// +/// From b5c76222402d70a618992a169998023312a36e3c Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Wed, 11 Jul 2018 13:27:18 -0400 Subject: [PATCH 2/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 067c2c5a37f..e2348033de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Gave `EuiFlyout` close button a data-test-subj ([#1000](https://github.com/elastic/eui/pull/1000/files)) +- Add basic typings for Flyout ([#1001](https://github.com/elastic/eui/pull/1001)) ## [`1.2.1`](https://github.com/elastic/eui/tree/v1.2.1) From 9e9731c31223c1f5dffc6fa861bd949fb5dc4821 Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Wed, 11 Jul 2018 13:36:49 -0400 Subject: [PATCH 3/4] expand the typings --- src/components/flyout/index.d.ts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/components/flyout/index.d.ts b/src/components/flyout/index.d.ts index aa33540343b..5cd7cc47cce 100644 --- a/src/components/flyout/index.d.ts +++ b/src/components/flyout/index.d.ts @@ -1,3 +1,28 @@ declare module '@elastic/eui' { - export const EuiFlyout: React.SFC; + export interface EuiFlyoutProps { + onClose: () => void; + size: 's' | 'm' | 'l'; + /** + * Hides the default close button. You must provide another close button somewhere within the flyout. + */ + hideCloseButton: boolean; + /** + * Locks the mouse / keyboard focus to within the flyout + */ + ownFocus: boolean; + } + + export const EuiFlyout: React.SFC< + CommonProps & + EuiFlyoutProps + >; + + export const EuiFlyoutBody: React.SFC; + + export interface EuiFlyoutHeaderProps { + hasBorder: boolean; + } + export const EuiFlyoutHeader: React.SFC; + + export const EuiFlyoutFooter: React.SFC; } \ No newline at end of file From 2d03f5e506ab99bcd828d12fbf1202d86151db9d Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Wed, 11 Jul 2018 14:55:47 -0400 Subject: [PATCH 4/4] clean up change description --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2348033de8..f8e67b12212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Gave `EuiFlyout` close button a data-test-subj ([#1000](https://github.com/elastic/eui/pull/1000/files)) -- Add basic typings for Flyout ([#1001](https://github.com/elastic/eui/pull/1001)) +- Add typings for `EuiFlyout`, `EuiFlyoutBody`, `EuiFlyoutHeader`, and `EuiFlyoutFooter` ([#1001](https://github.com/elastic/eui/pull/1001)) ## [`1.2.1`](https://github.com/elastic/eui/tree/v1.2.1)