-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: Fix the icon button level prop #444
Conversation
Took the liberty of tweaking the right margin of the number. I didn't notice it previously but it was slightly off. This looks better. Nice work! 👍 |
My original thinking was that since |
@aduth I'm not sure I understand? Could you clarify? |
<IconButton level="1" /> And the implementation of <IconButton data-level="1" /> And |
…g into fix/icon-button/level
Tks for the explanation @aduth you raise a good point and it should be addressed now. |
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 👍
editor/components/toolbar/style.scss
Outdated
@@ -30,6 +30,16 @@ | |||
background-color: $dark-gray-500; | |||
color: $white; | |||
} | |||
|
|||
&:after { |
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.
Likely no difference since styles ensure there's no impact on layout when empty, but this should probably only be applied if the control actually has a data-level
attribute:
&[data-level]:after {
This PR introduces a
level
prop for theIconButton
instead of using thechildren
prop for this purpose. Children can contain components etc... I think it's not suited for this.Also, in #429 I'm using the children prop to display text next to the icon which is more appropriate IMO.