Skip to content

Commit

Permalink
fix(accordion): ensure disableContentPadding works with subtle variant
Browse files Browse the repository at this point in the history
Fixes issue where disableContentPadding prop had no effect in subtle variant.

fix #6723
  • Loading branch information
nuria1110 committed May 9, 2024
1 parent 939870c commit f0d20fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/accordion/accordion.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,19 @@ const StyledAccordionContent = styled.div<StyledAccordionContentProps>`
padding-top: var(--spacing100);
overflow: hidden;
${({ disableContentPadding }) =>
disableContentPadding &&
css`
padding: 0;
`}
${({ variant }) =>
variant === "subtle" &&
css`
margin-left: var(--spacing150);
padding: var(--spacing100) var(--spacing200) var(--spacing300);
border-left: 2px solid var(--colorsUtilityMajor100);
`}
${({ disableContentPadding }) =>
disableContentPadding &&
css`
padding: 0;
`}
`;

StyledAccordionGroup.defaultProps = {
Expand Down

0 comments on commit f0d20fa

Please sign in to comment.