-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic typings for Flyout #1001
Add basic typings for Flyout #1001
Conversation
src/components/flyout/index.d.ts
Outdated
@@ -0,0 +1,3 @@ | |||
declare module '@elastic/eui' { | |||
export const EuiFlyout: React.SFC<any>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we put it into EUI, should we rather also properly type the Properties here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhhh alright alright. :) Typings expanded.
9c17f8d
to
7ef218d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGreatTM!
587dd27
to
2d03f5e
Compare
declare module '@elastic/eui' { | ||
export interface EuiFlyoutProps { | ||
onClose: () => void; | ||
size: 's' | 'm' | 'l'; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can get rid of stuff like this: https://github.com/elastic/kibana/pull/20163/files#diff-e90413d01eed523422d8446b072e6f7eR26
cc @timroes