-
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
Correct IconControlProps to include an onClick definition #3581
Correct IconControlProps to include an onClick definition #3581
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/ |
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
Verified by adding some more controls to the .test.tsx
file
{
controlType: 'icon',
id: 'sample_icon',
iconType: 'alert',
color: 'danger',
'aria-label': 'Sample Icon',
onClick: () => {},
},
{
controlType: 'icon',
id: 'sample_icon',
iconType: 'alert',
color: 'danger',
'aria-label': 'Sample Icon',
href: '#danger',
},
{
controlType: 'icon',
id: 'sample_icon',
iconType: 'alert',
color: 'danger',
'aria-label': 'Sample Icon',
onClick: () => {},
href: '#danger',
},
Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/ |
* Correct IconControlProps to include an onClick definition * changelog
Summary
Closes #3523
Added the
onClick
value toIconControlProps
, tested by copying src-docs/src/views/control_bar/control_bar.js'scodeControls
into control_bar.tsx and typing asControl[]
.Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Added or updated jest tests- [ ] Checked for accessibility including keyboard-only and screenreader modes