Skip to content

Commit 9b79028

Browse files
committed
fix(home): prevent random game tag clipping
1 parent 035a7ca commit 9b79028

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

src/pages/Home/RandomGamePanel.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,23 @@ export function RandomGamePanel({
8181
{game.developer}
8282
</Typography>
8383
) : null}
84-
<Box className="mt-2 flex gap-1.5 overflow-hidden">
84+
<Box className="mt-2 flex min-w-0 gap-1.5 overflow-hidden">
8585
{game.tags?.slice(0, 3).map((tag) => (
86-
<Chip key={tag} label={tag} size="small" variant="outlined" />
86+
<Chip
87+
key={tag}
88+
label={tag}
89+
title={tag}
90+
size="small"
91+
variant="outlined"
92+
className="min-w-0 shrink"
93+
sx={{
94+
"& .MuiChip-label": {
95+
overflow: "hidden",
96+
textOverflow: "ellipsis",
97+
whiteSpace: "nowrap",
98+
},
99+
}}
100+
/>
87101
))}
88102
</Box>
89103
</Box>

0 commit comments

Comments
 (0)