Стили сеток исправлены

This commit is contained in:
Александр Сироткин 2022-11-10 21:52:09 +05:00
parent aa0fafb7a1
commit 18f789c980
2 changed files with 6 additions and 3 deletions

View File

@ -22,7 +22,7 @@ export const Grid = memo<ComponentProps>(({ children, style, ...other }) => (
</div>
))
export const GridItem = memo<GridItemProps>(({ children, row, col, rowSpan, colSpan, style, ...other }) => {
export const GridItem = memo<GridItemProps>(({ children, row, col, rowSpan, colSpan, style, className, ...other }) => {
const localRow = +row
const localCol = +col
const localColSpan = colSpan ? colSpan - 1 : 0
@ -32,12 +32,11 @@ export const GridItem = memo<GridItemProps>(({ children, row, col, rowSpan, colS
gridColumnEnd: localCol + localColSpan,
gridRowStart: localRow,
gridRowEnd: localRow + localRowSpan,
padding: '4px',
...style,
}
return (
<div style={gridItemStyle} {...other}>
<div className={`asb-grid-item ${className || ''}`} style={gridItemStyle} {...other}>
{children}
</div>
)

View File

@ -153,4 +153,8 @@ code {
.color-pale-green {
background-color: #98fb98;
}
.asb-grid-item {
padding: 4px;
}