-
Notifications
You must be signed in to change notification settings - Fork 596
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
CloseButton #120
CloseButton #120
Conversation
} | ||
|
||
CloseButton.propTypes = { | ||
...Button.propTypes, |
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.
We should call out the onClick
prop here so that it's easier for people looking at the code to see that it's supported.
We agreed in the component review that this is probably not the right way do the close button, because this particular component shouldn't support most of the props that Button does ( Instead, let's introduce an OcticonButton that renders a |
This adds the
CloseButton
component to close #114, which I think means just the little ✖️ that lives in the corner of various modals and menus. We'll probably need to refactor this (and perhapsButton
, too) a bit more as we put it to use in other components (for instance, SelectMenu in #116), but I think this is a good start.I had to add support for a new value of the Button component's
scheme
prop:scheme="octicon"
, which translates to thebtn-link text-inherit
utility classes. I originally looked at usingBox-btn-octicon
, but that didn't work unless it was contained by a Box.We could revisit this to use the
btn-octicon
class if we decide to take on primer/css#413.