Skip to content

Commit 10cc061

Browse files
committed
Add the height prop (Column)
1 parent de6356a commit 10cc061

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Stacks_component_Column.res

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Box = Stacks_component_Box
1212
let make = (
1313
// Column props
1414
~width: responsiveProp<flex>=[#fluid],
15+
~height: responsiveProp<flex>=[#content],
1516
// Box props
1617
~padding=?,
1718
~paddingX=?,
@@ -74,7 +75,9 @@ let make = (
7475
let {isCollapsed, space, debugStyle} = useColumns()
7576
let resolveResponsiveProp = useResponsiveProp()
7677
let width = resolveResponsiveProp(Some(width))
77-
let boxStyle = Style.arrayOption([Some(styles["fullWidth"]), debugStyle, style])
78+
let height = resolveResponsiveProp(Some(height))
79+
let heightStyle = isCollapsed ? None : resolveFlexBasis(height)
80+
let boxStyle = Style.arrayOption([Some(styles["fullWidth"]), heightStyle, debugStyle, style])
7881
let style = Style.arrayOption(
7982
isCollapsed
8083
? [Some(styles["fullWidth"]), Some(marginTop(. space))]

0 commit comments

Comments
 (0)