Skip to content
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

Merged

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Jun 9, 2020

Summary

Closes #3523

Added the onClick value to IconControlProps, tested by copying src-docs/src/views/control_bar/control_bar.js's codeControls into control_bar.tsx and typing as Control[].

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox

  • Props have proper autodocs
    - [ ] 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
  • A changelog entry exists and is marked appropriately

@chandlerprall chandlerprall requested a review from thompsongl June 9, 2020 17:48
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/

Copy link
Contributor

@thompsongl thompsongl left a 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',
  },

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3581/

@chandlerprall chandlerprall merged commit 501f0c2 into elastic:master Jun 11, 2020
@chandlerprall chandlerprall deleted the bug/3523-control-bar-types branch June 11, 2020 16:24
phyolim pushed a commit to phyolim/eui that referenced this pull request Jun 11, 2020
* Correct IconControlProps to include an onClick definition

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ControlBar TypeScript error: No overload matches this call
4 participants