-
Notifications
You must be signed in to change notification settings - Fork 36
Add Borderless
variant to Accordion
#2446
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
Conversation
@@ -82,6 +82,9 @@ export const components = ({ | |||
borderRadius: 0, | |||
boxShadow: "none", | |||
|
|||
'&[data-ods-type="accordion"][data-ods-variant="borderless"]': { |
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.
Probably don't need the extra selector here
'&[data-ods-type="accordion"][data-ods-variant="borderless"]': { | |
'&[data-ods-variant="borderless"]': { |
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.
Good call, initially I thought having type="accordion and variant="borderless" would be helpful for targeting but since we don't have global CSS there shouldn't be confusion, plus it's one less attribute to pass.
@@ -81,6 +88,8 @@ const Accordion = ({ | |||
return ( | |||
<MuiAccordion | |||
data-se={testId} | |||
data-ods-type="accordion" | |||
data-ods-variant={variant} | |||
defaultExpanded={isDefaultExpanded} | |||
disabled={isDisabled} | |||
disableGutters |
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.
@benlister-okta In the borderless version, do we want the gutters? So, if we have 2 of these next to each other, they give each other space?
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.
That seemingly only applies when they are open though... wonder if we want to add some margin if these are next to each other. Any thoughts?
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.
@@ -82,6 +82,14 @@ export const components = ({ | |||
borderRadius: 0, | |||
boxShadow: "none", | |||
|
|||
"&.MuiPaper-root.MuiAccordion-root[data-ods-variant='borderless']": { |
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.
Does this not work with just &[data-ods-variant='borderless']
? Feels like it should
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.
It seems to need the specificity for some reason. Previously I had the 2 data attributes and that worked, but for some reason, it gets overridden without the parent class attached 🤷🏼♂️
bbc17cc
to
158c29e
Compare
DES-6886
Summary
borderless
variant to accordion to match Figmastring
notReactNode
)Testing & Screenshots