-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(accordion): change buttonWidth prop type to string (FE-5709) #5914
feat(accordion): change buttonWidth prop type to string (FE-5709) #5914
Conversation
Passing run #15559 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
f30f1e5
to
faa3486
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9960389:
|
faa3486
to
046dbf3
Compare
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.
Overall the proposed changes look good to me, just the one question around whether we should avoid the breaking changes
@@ -21,7 +21,7 @@ export interface AccordionProps | |||
extends StyledAccordionContainerProps, | |||
SpaceProps { | |||
/** Width of the buttonHeading when it's set, defaults to 150px */ | |||
buttonWidth?: number; | |||
buttonWidth?: string; |
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.
I'm wondering if we should avoid the breaking change here and support both number
and string
. If it's a number value then we can keep the current behaviour of appending px
to it. If it's a string we just apply the value and let the implementing developers set the unit etc. What do you think?
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 minor comment from me, happy to approve though once @edleeks87's comment has been addressed 😄
4281fbe
to
f48a2ec
Compare
f48a2ec
to
3aa5b2f
Compare
3aa5b2f
to
34aa10c
Compare
🎉 This PR is included in version 116.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
addresses #5897
Proposed behaviour
buttonWidth prop should accept all valid string CSS width values
Current behaviour
buttonWidth prop accepts only numbers and a "px" string is added in CSS
Checklist
- [ ] Screenshots are included in the PR if useful- [ ] All themes are supported if required- [ ] Unit tests added or updated if required- [ ] Cypress automation tests added or updated if required- [ ] Storybook added or updated if required- [ ] Translations added or updated (including creating or amending translation keys table in storybook) if requiredd.ts
file added or updated if required- [ ] Related docs have been updated if requiredQA
Additional context
Testing instructions
The following CodeSandbox is an example of the broken behaviour.
You can see the new behaviour by looking at the version in the comment by
codesandbox[bot]
.