forked from ddrilling/asb_cloud_front
Стили сеток исправлены
This commit is contained in:
parent
aa0fafb7a1
commit
18f789c980
@ -22,7 +22,7 @@ export const Grid = memo<ComponentProps>(({ children, style, ...other }) => (
|
|||||||
</div>
|
</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 localRow = +row
|
||||||
const localCol = +col
|
const localCol = +col
|
||||||
const localColSpan = colSpan ? colSpan - 1 : 0
|
const localColSpan = colSpan ? colSpan - 1 : 0
|
||||||
@ -32,12 +32,11 @@ export const GridItem = memo<GridItemProps>(({ children, row, col, rowSpan, colS
|
|||||||
gridColumnEnd: localCol + localColSpan,
|
gridColumnEnd: localCol + localColSpan,
|
||||||
gridRowStart: localRow,
|
gridRowStart: localRow,
|
||||||
gridRowEnd: localRow + localRowSpan,
|
gridRowEnd: localRow + localRowSpan,
|
||||||
padding: '4px',
|
|
||||||
...style,
|
...style,
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={gridItemStyle} {...other}>
|
<div className={`asb-grid-item ${className || ''}`} style={gridItemStyle} {...other}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -153,4 +153,8 @@ code {
|
|||||||
|
|
||||||
.color-pale-green {
|
.color-pale-green {
|
||||||
background-color: #98fb98;
|
background-color: #98fb98;
|
||||||
|
}
|
||||||
|
|
||||||
|
.asb-grid-item {
|
||||||
|
padding: 4px;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user