Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
28 changes: 28 additions & 0 deletions src/components/flyout/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
declare module '@elastic/eui' {
export interface EuiFlyoutProps {
onClose: () => void;
size: 's' | 'm' | 'l';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that typing might be wrong. Is size really a mandatory property? If not it should be marked as optional size? in the property interface.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* 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<CommonProps>;

export interface EuiFlyoutHeaderProps {
hasBorder: boolean;
}
export const EuiFlyoutHeader: React.SFC<CommonProps & EuiFlyoutHeaderProps>;

export const EuiFlyoutFooter: React.SFC<CommonProps>;
}
1 change: 1 addition & 0 deletions src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
/// <reference path="./overlay_mask/index.d.ts" />
/// <reference path="./horizontal_rule/index.d.ts" />
/// <reference path="./page/index.d.ts" />
/// <reference path="./flyout/index.d.ts" />