File tree Expand file tree Collapse file tree 7 files changed +24
-29
lines changed
compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web
compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material Expand file tree Collapse file tree 7 files changed +24
-29
lines changed Original file line number Diff line number Diff line change 11package com.huanshankeji.compose.web
22
33import androidx.compose.runtime.Composable
4- import com.huanshankeji.compose.web.material.defaultSpacing
54import org.jetbrains.compose.web.css.*
65import org.jetbrains.compose.web.dom.ContentBuilder
76import org.jetbrains.compose.web.dom.Div
@@ -64,6 +63,29 @@ fun RowWithSpaceBetween(
6463 styles?.invoke(this )
6564 }, content)
6665
66+ @Composable
67+ fun ColumnWithGaps (
68+ styles : Styles ? = null,
69+ gap : CSSNumeric ,
70+ fitContent : Boolean = true,
71+ content : ContentBuilder <HTMLDivElement >
72+ ) =
73+ Column ({
74+ gap(gap)
75+ styles?.invoke(this )
76+ }, fitContent, content)
77+
78+ @Composable
79+ fun RowWithGaps (
80+ styles : Styles ? = null,
81+ gap : CSSNumeric ,
82+ content : ContentBuilder <HTMLDivElement >
83+ ) =
84+ Row ({
85+ gap(gap)
86+ styles?.invoke(this )
87+ }, content)
88+
6789@Composable
6890fun Centered (
6991 styles : Styles ? = null,
@@ -88,7 +110,7 @@ fun CenteredInViewport(
88110@Composable
89111fun FrGrid (
90112 numColumns : Int ,
91- gap : CSSNumeric = defaultSpacing ,
113+ gap : CSSNumeric ,
92114 content : HTMLElementContent
93115) =
94116 Div ({
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -2,38 +2,11 @@ package com.huanshankeji.compose.web.material
22
33import androidx.compose.runtime.Composable
44import com.huanshankeji.compose.web.CenteredInViewport
5- import com.huanshankeji.compose.web.Column
6- import com.huanshankeji.compose.web.Row
75import com.huanshankeji.compose.web.Styles
86import org.jetbrains.compose.web.attributes.AttrsScope
9- import org.jetbrains.compose.web.css.CSSNumeric
10- import org.jetbrains.compose.web.css.gap
117import org.jetbrains.compose.web.dom.ContentBuilder
128import org.w3c.dom.HTMLDivElement
139
14- @Composable
15- fun ColumnWithGaps (
16- styles : Styles ? = null,
17- gap : CSSNumeric = defaultSpacing,
18- fitContent : Boolean = true,
19- content : ContentBuilder <HTMLDivElement >
20- ) =
21- Column ({
22- gap(gap)
23- styles?.invoke(this )
24- }, fitContent, content)
25-
26- @Composable
27- fun RowWithGaps (
28- styles : Styles ? = null,
29- gap : CSSNumeric = defaultSpacing,
30- content : ContentBuilder <HTMLDivElement >
31- ) =
32- Row ({
33- gap(gap)
34- styles?.invoke(this )
35- }, content)
36-
3710@Composable
3811fun CenteredCardInViewport (
3912 viewportDivStyles : Styles ? = null,
You can’t perform that action at this time.
0 commit comments