Skip to content
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

Fix accordion icon alignment #33418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = () => (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not need a separate story for this on the storybook website. I suggest verifying if this scenario is already covered by the Visual Regression tests here, and if not, adding this story there.

<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.',
},
},
};
Loading