-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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): add align prop to component and skeleton to change heading alignment #4754
feat(accordion): add align prop to component and skeleton to change heading alignment #4754
Conversation
@@ -23,6 +23,22 @@ | |||
width: 100%; | |||
} | |||
|
|||
.#{$prefix}--accordion--start { | |||
.#{$prefix}--accordion__heading { |
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 you un-nest selectors here?
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.
Thanks @joshblack! Just pushed an update that unnests these selectors 👍
Deploy preview for carbon-components-react ready! Built with commit bf7fd67 https://deploy-preview-4754--carbon-components-react.netlify.com |
Deploy preview for the-carbon-components ready! Built with commit bf7fd67 https://deploy-preview-4754--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit bf7fd67 |
@carbon-design-system/design was curious if this was functionality we wanted to add in 👀 |
I think if it's an easy to add and switch between the two then its ok with design. We'll need to maybe think of some guidance on how the two should be used and if there's a usage difference or if its just an aesthetic chose a product can make and then consistently use. |
Thank you @aagonzales! As an example, we have a component in the IBM Security portoflio called a I'm sure @cameroncalder has more examples / justifications he can share in Slack though! There are probably other patterns out there as well, aside from the component above. |
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
Closes #4584
Proposal to add an
align
prop to theAccordion
andAccordionSkeleton
.By default,
align="end"
, which is the current Carbon default.If
align="start"
, then the heading text + arrow order is reversed, with the arrow being at the "start" of the heading row.Changelog
New
align
prop with class name and stylesChanged
align
prop knobsTesting / Reviewing
In the
carbon-components-react
deployment for this PR, open the knobs & use thealign
knob to change alignment of theAccordion
andAccordionSkeleton
headings.