Skip to content

Commit 53ff09f

Browse files
committed
Use Arrangement.spacedBy from Kobweb
See varabyte/kobweb#541 for its introduction into Kobweb.
1 parent 8978aef commit 53ff09f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

common/src/jsMain/kotlin/com/huanshankeji/compose/foundation/layout/Arrangement.js.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import com.huanshankeji.compose.ui.unit.toPx
99
import com.varabyte.kobweb.compose.foundation.layout.Arrangement
1010
import com.varabyte.kobweb.compose.ui.styleModifier
1111
import org.jetbrains.compose.web.css.StyleScope
12-
import org.jetbrains.compose.web.css.gap
1312
import com.varabyte.kobweb.compose.foundation.layout.Arrangement as PlatformArrangement
1413

1514
@Immutable
@@ -73,11 +72,7 @@ actual object Arrangement {
7372

7473
@Stable
7574
actual fun spacedBy(space: Dp): HorizontalOrVertical =
76-
object : HorizontalOrVertical.FromStyleImpl() {
77-
override fun StyleScope.styles() {
78-
gap(space.toPx())
79-
}
80-
}
75+
HorizontalOrVertical.Impl(PlatformArrangement.spacedBy(space.toPx()))
8176
}
8277

8378
fun PlatformModifier.stylesFrom(arrangement: CommonArrangement) =

0 commit comments

Comments
 (0)