diff --git a/concrete/src/main/kotlin/glass/yasan/concrete/component/Spacer.kt b/concrete/src/main/kotlin/glass/yasan/concrete/component/Spacer.kt index 662fd13..f6a853c 100644 --- a/concrete/src/main/kotlin/glass/yasan/concrete/component/Spacer.kt +++ b/concrete/src/main/kotlin/glass/yasan/concrete/component/Spacer.kt @@ -1,7 +1,5 @@ package glass.yasan.concrete.component -import androidx.compose.foundation.layout.ColumnScope -import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.width @@ -24,7 +22,7 @@ public fun Spacer( } @Composable -public fun RowScope.Spacer( +public fun SpacerHorizontal( width: Dp, modifier: Modifier = Modifier, ) { @@ -36,7 +34,7 @@ public fun RowScope.Spacer( } @Composable -public fun ColumnScope.Spacer( +public fun SpacerVertical( height: Dp, modifier: Modifier = Modifier, ) { diff --git a/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerHorizontal.kt b/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerHorizontal.kt deleted file mode 100644 index e165a8b..0000000 --- a/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerHorizontal.kt +++ /dev/null @@ -1,15 +0,0 @@ -package glass.yasan.concrete.component - -import androidx.compose.runtime.Composable -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp - -@Composable -public fun SpacerHorizontal( - width: Dp, -) { - Spacer( - width = width, - height = 0.dp, - ) -} \ No newline at end of file diff --git a/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerVertical.kt b/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerVertical.kt index fac220a..e5261ff 100644 --- a/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerVertical.kt +++ b/concrete/src/main/kotlin/glass/yasan/concrete/component/SpacerVertical.kt @@ -1,15 +1,7 @@ package glass.yasan.concrete.component import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -@Composable -public fun SpacerVertical( - height: Dp, -) { - Spacer( - width = 0.dp, - height = height, - ) -} diff --git a/concrete/src/main/kotlin/glass/yasan/concrete/component/extension/SpacerExtensions.kt b/concrete/src/main/kotlin/glass/yasan/concrete/component/extension/SpacerExtensions.kt index 4428b31..48a8acc 100644 --- a/concrete/src/main/kotlin/glass/yasan/concrete/component/extension/SpacerExtensions.kt +++ b/concrete/src/main/kotlin/glass/yasan/concrete/component/extension/SpacerExtensions.kt @@ -1,11 +1,40 @@ package glass.yasan.concrete.component.extension +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp import glass.yasan.concrete.component.Spacer import glass.yasan.concrete.component.SpacerHorizontal import glass.yasan.concrete.component.SpacerVertical +@Composable +public fun RowScope.Spacer( + width: Dp, + modifier: Modifier = Modifier, +) { + Spacer( + width = width, + height = 0.dp, + modifier = modifier, + ) +} + +@Composable +public fun ColumnScope.Spacer( + height: Dp, + modifier: Modifier = Modifier, +) { + Spacer( + width = 0.dp, + height = height, + modifier = modifier, + ) +} + public fun LazyListScope.spacer( width: Dp, height: Dp, @@ -36,4 +65,4 @@ public fun LazyListScope.spacerVertical( height = height, ) } -} \ No newline at end of file +}