File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package com.huanshankeji.compose.web
33import androidx.compose.runtime.Composable
44import com.huanshankeji.compose.web.attributes.attrs
55import com.huanshankeji.compose.web.attributes.plus
6+ import com.huanshankeji.compose.web.css.FIT_CONTENT
67import com.huanshankeji.compose.web.css.Styles
8+ import com.huanshankeji.compose.web.css.width
79import com.huanshankeji.compose.web.css.wrapInAttrs
810import org.jetbrains.compose.web.css.*
911import org.jetbrains.compose.web.dom.AttrBuilderContext
@@ -37,7 +39,7 @@ fun Column(
3739 Flexbox (attrs<HTMLDivElement > {
3840 style {
3941 flexDirection(FlexDirection .Column )
40- if (fitContent) property( " width" , " fit-content " )
42+ if (fitContent) width( FIT_CONTENT )
4143 }
4244 } + attrs, content)
4345
Original file line number Diff line number Diff line change 1+ package com.huanshankeji.compose.web.css
2+
3+ import org.jetbrains.compose.web.css.StyleScope
4+
5+ fun StyleScope.width (value : String ) =
6+ property(" width" , value)
7+
8+ fun StyleScope.height (value : String ) =
9+ property(" height" , value)
10+
11+ const val FIT_CONTENT = " fit-content"
You can’t perform that action at this time.
0 commit comments