-
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
Convert radio form controls to TS #2438
Convert radio form controls to TS #2438
Conversation
cbe5ade
to
2eec6a4
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.
The old index.d.ts exported a number of values that index.ts does not. This creates a breaking change, and we should strive to export the meaningful types/interfaces.
Specifically these are now missing from the exports:
- EuiRadioGroupOption
- EuiRadioGroupChangeCallback
- EuiRadioGroupProps
- EuiRadioProps
I think that's the right call, for all the reasons you mentioned 👍 |
7e7ba21
to
63f6bc6
Compare
1fe7448
to
8ccaf20
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.
Changes LGTM; pulled and built eui.d.ts locally, tested to ensure expected types are still exported from the @elastic/eui
module
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.
LGTM. Kibana type check passes with the generated d.ts
Summary
Converts
EuiRadio
andEuiRadioGroup
to TypeScript.Note: I attempted to convert the docs example, however it's part of the long 'Form controls' page and I think it may necessitate a setup similar to
EuiSelectable
to handle theprops
andOptions
in the example. Those props pull from atypes.tsx
that lives with thesrc
component code... I'm speaking out of my depth here, but there are many other form controls which have not been converted in this space and something tells me this may be some sort of solution that rolls these all together. Anyway, given that, I bailed on converting the docs example since this was only for the radio bits.Checklist