-
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
Added labelProps
prop to [EuiSwitch, EuiRadio, EuiCheckbox]
#4516
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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! These are now applied to the right components. We'll also need to add tests per component. I find it easy to test the types of {...props}
by just doing something like:;
<EuiSwitch labelProps={requiredProps} />
@@ -56,6 +57,10 @@ export type EuiSwitchProps = CommonProps & | |||
disabled?: boolean; | |||
compressed?: boolean; | |||
type?: 'submit' | 'reset' | 'button'; | |||
/** | |||
* Object of props passed to the <span/> |
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.
* Object of props passed to the <span/> | |
* Object of props passed to the label's <span/> |
a9e1336
to
f4dfffd
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.
Almost there. Some more changes to the tests so to ensure they output something expected.
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.
Code LGTM!
Jenkins, test this
Jenkins, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4516/ |
Jenkins, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4516/ |
Summary
This PR Fixes #3660
Added
labelProps
prop to EuiSwitch, EuiRadio and EuiCheckbox.Checklist
- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Added or updated jest tests- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes