fix: row warning when set margin (#29688)

* fix: row warning when set margin

* fix
This commit is contained in:
xrkffgg 2021-03-11 10:44:18 +08:00 committed by GitHub
parent 17f5ce78f0
commit 52152ed384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}