Skip to content

Commit 25c0c30

Browse files
added word break to breadcrumbs to prevent side scroll bar and allow overflow to wrap within view
1 parent 7232ace commit 25c0c30

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/layouts/Breadcrumbs.jsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ const Breadcrumbs = () => {
3636
<MUIBreadcrumbs
3737
aria-label="breadcrumb"
3838
separator={<NavigateNextIcon fontSize="small" />}
39-
sx={{ margin: { xs: '20px', sm: '20px 80px' } }}
39+
sx={{
40+
margin: { xs: '20px', sm: '20px 80px' },
41+
wordWrap: 'break-word',
42+
overflowWrap: 'break-word'
43+
}}
4044
>
4145
{crumbs.map((crumb, index) =>
4246
index !== crumbs.length - 1 ? (
@@ -47,11 +51,20 @@ const Breadcrumbs = () => {
4751
.replaceAll(' ', '-')
4852
.toLowerCase()}`}
4953
key={crumb}
54+
style={{
55+
wordBreak: 'break-word'
56+
}}
5057
>
5158
{crumb}
5259
</Link>
5360
) : (
54-
<Typography component="h2" key={crumb}>
61+
<Typography
62+
component="h2"
63+
key={crumb}
64+
sx={{
65+
wordBreak: 'break-word'
66+
}}
67+
>
5568
{crumb}
5669
</Typography>
5770
)

0 commit comments

Comments
 (0)