Skip to content

Commit 218fc66

Browse files
committed
Use modifierOrAttrs in Column and Row in jsMain
1 parent 600973c commit 218fc66

File tree

2 files changed

+4
-4
lines changed
  • compose-multiplatform-common/src/jsMain/kotlin/com/huanshankeji/compose/layout

2 files changed

+4
-4
lines changed

compose-multiplatform-common/src/jsMain/kotlin/com/huanshankeji/compose/layout/Column.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.huanshankeji.compose.layout
22

33
import androidx.compose.runtime.Composable
44
import com.huanshankeji.compose.ui.ModifierOrAttrs
5+
import com.huanshankeji.compose.ui.toAttrs
56
import org.jetbrains.compose.web.dom.ElementScope
67
import org.w3c.dom.HTMLDivElement
78

@@ -15,7 +16,6 @@ actual interface ColumnScope {
1516

1617
@Composable
1718
actual fun Column(modifierOrAttrs: ModifierOrAttrs<ColumnElement>, content: @Composable ColumnScope.() -> Unit) =
18-
// TODO: `modifierOrAttrs` not used yet
19-
com.huanshankeji.compose.web.Column {
19+
com.huanshankeji.compose.web.Column(modifierOrAttrs.toAttrs()) {
2020
ColumnScope.Impl(this).content()
2121
}

compose-multiplatform-common/src/jsMain/kotlin/com/huanshankeji/compose/layout/Row.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.huanshankeji.compose.layout
22

33
import androidx.compose.runtime.Composable
44
import com.huanshankeji.compose.ui.ModifierOrAttrs
5+
import com.huanshankeji.compose.ui.toAttrs
56
import org.jetbrains.compose.web.dom.ElementScope
67
import org.w3c.dom.HTMLDivElement
78

@@ -15,7 +16,6 @@ actual interface RowScope {
1516

1617
@Composable
1718
actual fun Row(modifierOrAttrs: ModifierOrAttrs<RowElement>, content: @Composable RowScope.() -> Unit) =
18-
// TODO: `modifierOrAttrs` not used yet
19-
com.huanshankeji.compose.web.Row {
19+
com.huanshankeji.compose.web.Row(modifierOrAttrs.toAttrs()) {
2020
RowScope.Impl(this).content()
2121
}

0 commit comments

Comments
 (0)