Skip to content

Commit

Permalink
Revert "Remove SpacerHorizontal & SpacerVertical"
Browse files Browse the repository at this point in the history
This reverts commit 21aef43.
  • Loading branch information
yasanglass committed Mar 10, 2024
1 parent 462c441 commit 6e68ac8
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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,
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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 SpacerVertical(
height: Dp,
) {
Spacer(
width = 0.dp,
height = height,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package glass.yasan.concrete.component.extension

import androidx.compose.foundation.lazy.LazyListScope
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

public fun LazyListScope.spacer(
width: Dp = 0.dp,
height: Dp = 0.dp,
width: Dp,
height: Dp,
) {
item {
Spacer(
Expand All @@ -16,3 +17,23 @@ public fun LazyListScope.spacer(
)
}
}

public fun LazyListScope.spacerHorizontal(
width: Dp,
) {
item {
SpacerHorizontal(
width = width,
)
}
}

public fun LazyListScope.spacerVertical(
height: Dp,
) {
item {
SpacerVertical(
height = height,
)
}
}

0 comments on commit 6e68ac8

Please sign in to comment.