Always use available width for grid items (#375)

In case a manga thumbnail was smaller than the set item width, the item didn't use all its available width.
Thus, being smaller than the other items.
This commit is contained in:
schroda
2023-06-17 20:54:55 +02:00
committed by GitHub
parent ad38641616
commit cdacc4b2a9

View File

@@ -34,7 +34,7 @@ const GridItemContainerWithDimension = (
const columnsPerItem = gridLayout === GridLayout.List ? maxColumns : maxColumns / itemsPerRow; const columnsPerItem = gridLayout === GridLayout.List ? maxColumns : maxColumns / itemsPerRow;
return ({ children, ...itemProps }: GridTypeMap['props'] & Partial<GridItemProps>) => ( return ({ children, ...itemProps }: GridTypeMap['props'] & Partial<GridItemProps>) => (
<Grid {...itemProps} item xs={columnsPerItem} sx={{ paddingTop: '8px', paddingLeft: '8px' }}> <Grid {...itemProps} item xs={columnsPerItem} sx={{ width: '100%', paddingTop: '8px', paddingLeft: '8px' }}>
{children} {children}
</Grid> </Grid>
); );