-
Notifications
You must be signed in to change notification settings - Fork 841
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 EuiToast to TypeScript #2032
Conversation
@@ -1,14 +1,13 @@ | |||
import React from 'react'; | |||
import { render, mount } from 'enzyme'; | |||
import sinon from 'sinon'; |
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.
💝💖
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.
One small change requested, approving to not block merging.
src/components/toast/toast.tsx
Outdated
const headerClasses = classNames('euiToastHeader', { | ||
'euiToastHeader--withBody': children, | ||
}); | ||
|
||
let headerIcon; | ||
let headerIcon: ReactElement<typeof EuiIcon>; |
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.
ReactElement
's signature takes props as the first arg, then the component constructor. This should be ReactElement<PropsOf<EuiIcon>, typeof EuiIcon>
(PropsOf from EUI's common.ts). However, the argument defaults are fine and this can be simplified to let headerIcon: ReactElement;
0fd863e
to
82a05a8
Compare
@pugnascotia, I'm sorry, have you just rename global_toast_list snapshot without updating? I'm not sure when and why I started getting this. |
Those aren't snapshot errors. Strange though - I couldn't have merged if CI wasn't passing. Are you seeing that on master, or another branch? |
Hm. Seems that merging master into my branch solved the issue, strange. Anyway, thanks 🙏 |
That's a known flaky test in our suite #1999 |
Summary
Convert EuiToast to TypeScript.
Checklist