Skip to content

Commit

Permalink
Fix accordion icon alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
vs4vijay committed Dec 6, 2024
1 parent f42240c commit 93235ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const useStyles = makeStyles({
icon: {
height: '100%',
display: 'flex',
alignItems: 'center',
alignItems: 'flex-start',
paddingRight: tokens.spacingHorizontalS,
lineHeight: tokens.lineHeightBase500,
fontSize: tokens.fontSizeBase500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,24 @@ WithIcon.parameters = {
},
},
};

export const WithLongHeaderText = () => (
<Accordion>
<AccordionItem value="1">
<AccordionHeader icon={<RocketRegular />}>
Accordion Header with a very long text that overflows to the next line
</AccordionHeader>
<AccordionPanel>
<div>Accordion Panel 1</div>
</AccordionPanel>
</AccordionItem>
</Accordion>
);

WithLongHeaderText.parameters = {
docs: {
description: {
story: 'An accordion header with a long text that overflows to the next line, demonstrating icon alignment.',
},
},
};

0 comments on commit 93235ed

Please sign in to comment.