diff --git a/CHANGELOG.md b/CHANGELOG.md index 067c2c5a37f..f8e67b12212 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 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) diff --git a/src/components/flyout/index.d.ts b/src/components/flyout/index.d.ts new file mode 100644 index 00000000000..5cd7cc47cce --- /dev/null +++ b/src/components/flyout/index.d.ts @@ -0,0 +1,28 @@ +declare module '@elastic/eui' { + 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 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 @@ /// /// /// +///