-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(Button): Add bool to propTypes of attached #2105
Conversation
Looks like we may also need to update the ButtonGroup. |
Codecov Report
@@ Coverage Diff @@
## master #2105 +/- ##
=======================================
Coverage 99.76% 99.76%
=======================================
Files 149 149
Lines 2598 2598
=======================================
Hits 2592 2592
Misses 6 6
Continue to review full report at Codecov.
|
Looks to me like |
Weirdly enough, any other string will work. 😕 https://codepen.io/anon/pen/KXgbpz?editors=1111 EDIT: also some issues with the attaching of the group in general: the left side isn't rounded at all no matter what. EDIT2: nvm, that's a known issue with single button groups |
I pushed a commit that I think fixes the handling for |
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.
@kasbah Thanks for PR, I've left some comments about styling. Also, Button
should also use useKeyOrValueAndKey
and use corresponding test.
src/elements/Button/ButtonGroup.js
Outdated
@@ -10,6 +10,7 @@ import { | |||
SUI, | |||
useKeyOnly, | |||
useValueAndKey, | |||
useKeyOrValueAndKey, |
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.
Please sort members in alphabetical order, i.e.:
useKeyOnly,
useKeyOrValueAndKey,
useValueAndKey,
src/elements/Button/ButtonGroup.js
Outdated
useValueAndKey(floated, 'floated'), | ||
useKeyOrValueAndKey(attached, 'attached'), |
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.
^, same there
@@ -13,7 +13,8 @@ describe('ButtonGroup', () => { | |||
widthClass: 'buttons', | |||
}) | |||
|
|||
common.propKeyAndValueToClassName(ButtonGroup, 'attached', ['left', 'right', 'top', 'bottom']) | |||
common.propKeyOrValueAndKeyToClassName(ButtonGroup, 'attached', ['left', 'right', 'top', 'bottom']) |
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.
And there 😄
0e5802a
to
ef82ce7
Compare
Thanks @layershifter, I fixed the code style issues. |
@kasbah Shame to me 🐰 I've retriggered build, now it passed successfully. Great job 👍 |
Released in |
fixes #2104