fix: Moved to using gap css instead of hacking

Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
Florian Bouillon 2023-01-30 15:33:33 +01:00
parent caa646b6d2
commit 2d8076e774
Signed by: Florian Bouillon
GPG Key ID: E05B3A94178D3A7C
3 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,6 @@
max-width 100%
flex-basis 0
flex-grow 1
padding $gapSize 0 0 $gapSize
&.nogrow
max-width initial

View File

@ -3,7 +3,8 @@
.row
display flex
flex-wrap wrap
margin (0 - $gapSize) 0 0 (0 - $gapSize)
&:not(.nogap)
gap $gapSize
.nowrap
flex-wrap nowrap

View File

@ -12,6 +12,7 @@ interface Props {
nowrap?: boolean
nogrow?: boolean
className?: string
nogap?: boolean
onClick?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void
}
@ -27,6 +28,7 @@ export default class Row extends React.Component<Props> {
[css[`align-${this.props.align}`], this.props.align],
[css.nowrap, this.props.nowrap],
[css.nogrow, this.props.nogrow],
[css.nogap, this.props.nogap],
this.props.className
)}
onClick={this.props.onClick}