-
Notifications
You must be signed in to change notification settings - Fork 842
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
Convert EuiCopy component to TypeScript #2016
Convert EuiCopy component to TypeScript #2016
Conversation
Thanks @scottybollinger ! As mentioned in Slack, we are in the process of actually converting the components to true TS instead of adding the TS defs as a shim. We can absolutely proceed with reviewing this PR as is unless you want to take a stab at converting to TS? |
@cchaos I went ahead and converted it and updated the title and description of the PR. Let me know if you need anything else! |
src/components/copy/copy.tsx
Outdated
/** | ||
* Tooltip message displayed before copy function is called. | ||
*/ | ||
beforeMessage: ReactNode; |
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.
this prop is optional, please update the interface to match: beforeMessage?: ReactNode;
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.
Thanks @chandlerprall. Just to be sure, is there an associated defaultProps
value for this as well?
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.
No, there is not (thanks for double checking!) - it's allowed to be null
and in that case nothing is rendered.
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.
Thanks, LGTM!
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.
Changes LGTM
Summary
Convert
EuiCopy
component to TypeScript.Checklist