mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: row warning when set margin (#29688)
* fix: row warning when set margin * fix
This commit is contained in:
parent
17f5ce78f0
commit
52152ed384
@ -103,13 +103,15 @@ const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {
|
||||
const horizontalGutter = gutters[0] > 0 ? gutters[0] / -2 : undefined;
|
||||
const verticalGutter = gutters[1] > 0 ? gutters[1] / -2 : undefined;
|
||||
|
||||
rowStyle.marginLeft = horizontalGutter;
|
||||
rowStyle.marginRight = horizontalGutter;
|
||||
if (horizontalGutter) {
|
||||
rowStyle.marginLeft = horizontalGutter;
|
||||
rowStyle.marginRight = horizontalGutter;
|
||||
}
|
||||
|
||||
if (supportFlexGap) {
|
||||
// Set gap direct if flex gap support
|
||||
[, rowStyle.rowGap] = gutters;
|
||||
} else {
|
||||
} else if (verticalGutter) {
|
||||
rowStyle.marginTop = verticalGutter;
|
||||
rowStyle.marginBottom = verticalGutter;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user