-
Notifications
You must be signed in to change notification settings - Fork 2.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
[Button Group] Add outlined prop #6788
Conversation
Generate changelog in
|
Fix lint errorBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Invalidated by push of 25aeb89
Fix border overlapBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
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.
just one small comment - could you push a commit so the PR preview builds again?
const buttonGroupClasses = classNames( | ||
Classes.BUTTON_GROUP, | ||
{ | ||
[Classes.FILL]: fill, | ||
[Classes.LARGE]: large, | ||
[Classes.MINIMAL]: minimal, | ||
[Classes.OUTLINED]: outlined, |
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.
🎉
38c31cd
to
8f61358
Compare
8f61358
to
b70d7d2
Compare
Only apply border-bottom inside outlined wrapperBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
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.
} | ||
} | ||
|
||
&:not(.#{$ns}-minimal):not(.#{$ns}-outlined) { |
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.
|
||
&.#{$ns}-outlined { | ||
> .#{$ns}-button:not(:last-child) { | ||
border-bottom: none; |
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.
could we do a transparent color border instead of none here? border-bottom-color: transparent
- it looks like that should fix any small shifts when toggling this prop
|
||
&:not(.#{$ns}-vertical) { | ||
> .#{$ns}-button:not(:last-child) { | ||
border-right: none; |
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.
here I think none
instead of transparent color actually helps, since the Button
component itself currently grows 2px when outlined. this brings that down to 1px at least
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.
Thank you for the PR!
We may need to revisit some of this CSS if addressing #4026 but this seems fine for now. The underlying button also displays some px shift when toggling this prop, so not worrying about it here either for now.
In practice if users use outline consistently (don't toggle for the same button group) this shouldn't be a big issue.
Checklist
Changes proposed in this pull request:
Add
outlined
prop toButtonGroup
component.Screenshot