Fix overlapping cells in product list view (#2657)

* Fix breaking words on table cells

* Update snapshots
This commit is contained in:
Patryk Andrzejewski 2022-12-08 13:08:35 +01:00 committed by GitHub
parent 5c7b191bb2
commit e803c1980e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ const useStyles = makeStyles(
theme => ({ theme => ({
[theme.breakpoints.up("md")]: { [theme.breakpoints.up("md")]: {
colName: { colName: {
minWidth: 250, minWidth: 300,
}, },
colPrice: { colPrice: {
width: 300, width: 300,
@ -58,7 +58,7 @@ const useStyles = makeStyles(
width: 200, width: 200,
}, },
colType: { colType: {
width: 200, width: 300,
}, },
colDate: { colDate: {
width: 200, width: 200,
@ -75,10 +75,14 @@ const useStyles = makeStyles(
width: "100%", width: "100%",
}, },
colName: { colName: {
wordBreak: "break-all",
"&$colNameFixed": { "&$colNameFixed": {
width: 250, width: 300,
}, },
}, },
colAvatar: {
wordBreak: "break-all",
},
colNameFixed: {}, colNameFixed: {},
colNameHeader: { colNameHeader: {
marginLeft: AVATAR_MARGIN, marginLeft: AVATAR_MARGIN,
@ -90,7 +94,9 @@ const useStyles = makeStyles(
textAlign: "right", textAlign: "right",
}, },
colPublished: {}, colPublished: {},
colType: {}, colType: {
wordBreak: "break-all",
},
link: { link: {
cursor: "pointer", cursor: "pointer",
}, },
@ -348,6 +354,7 @@ export const ProductList: React.FC<ProductListProps> = props => {
/> />
</TableCell> </TableCell>
<TableCellAvatar <TableCellAvatar
className={classes.colAvatar}
thumbnail={maybe(() => product.thumbnail.url)} thumbnail={maybe(() => product.thumbnail.url)}
> >
{product?.name ? ( {product?.name ? (