Skip to content
Closed
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 @@ -32,3 +32,10 @@ export const MiddleStep: StoryFn<BreadcrumbProps> = () => (
export const LastStep: StoryFn<BreadcrumbProps> = () => (
<Breadcrumb {...BASE_PROPS} activeStep={4} />
);

/** Narrow container — verifies wrap behavior at constrained widths (e.g., 200% zoom). */
export const NarrowContainer: StoryFn<BreadcrumbProps> = () => (
<div style={{ width: 500, border: '1px dashed #ccc' }}>
<Breadcrumb {...BASE_PROPS} activeStep={4} />
</div>
);
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ steps, activeStep, onSte
alignItems: 'center',
// @ts-ignore todo: fix this
backgroundColor: theme.palette.background.muted,
flexWrap: 'wrap',
gap: 1,
px: 3,
py: 2,
overflowX: 'auto',
[theme.breakpoints.down('md')]: {
flexDirection: 'column',
},
})}
>
{steps.map((label, index) => (
Expand Down Expand Up @@ -100,13 +98,17 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ steps, activeStep, onSte
>
{label}
</Typography>
</Box>

{index < steps.length - 1 && (
<Typography variant="body1" sx={{ mx: 2, color: 'text.secondary' }}>
&gt;
</Typography>
)}
{index < steps.length - 1 && (
<Typography
variant="body1"
sx={{ ml: 1, color: 'text.secondary' }}
aria-hidden="true"
>
&gt;
</Typography>
)}
</Box>
</React.Fragment>
))}
</Box>
Expand Down
Loading