-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0df194b
commit 7bc5165
Showing
5 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
stillbirth/src/main/kotlin/glass/yasan/stillbirth/component/Spacer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package glass.yasan.stillbirth.component | ||
|
||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.Dp | ||
|
||
@Composable | ||
public fun Spacer( | ||
width: Dp, | ||
height: Dp, | ||
) { | ||
Spacer( | ||
modifier = Modifier | ||
.width(width) | ||
.height(height), | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
stillbirth/src/main/kotlin/glass/yasan/stillbirth/component/SpacerHorizontal.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package glass.yasan.stillbirth.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, | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
stillbirth/src/main/kotlin/glass/yasan/stillbirth/component/SpacerVertical.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package glass.yasan.stillbirth.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, | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
stillbirth/src/main/kotlin/glass/yasan/stillbirth/component/extension/DividerExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package glass.yasan.stillbirth.component.extension | ||
|
||
import androidx.compose.foundation.lazy.LazyListScope | ||
import glass.yasan.stillbirth.component.Divider | ||
|
||
public fun LazyListScope.divider() { | ||
item { | ||
Divider() | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
stillbirth/src/main/kotlin/glass/yasan/stillbirth/component/extension/SpacerExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package glass.yasan.stillbirth.component.extension | ||
|
||
import androidx.compose.foundation.lazy.LazyListScope | ||
import androidx.compose.ui.unit.Dp | ||
import glass.yasan.stillbirth.component.Spacer | ||
import glass.yasan.stillbirth.component.SpacerHorizontal | ||
import glass.yasan.stillbirth.component.SpacerVertical | ||
|
||
public fun LazyListScope.spacer( | ||
width: Dp, | ||
height: Dp, | ||
) { | ||
item { | ||
Spacer( | ||
width = width, | ||
height = height, | ||
) | ||
} | ||
} | ||
|
||
public fun LazyListScope.spacerHorizontal( | ||
width: Dp, | ||
) { | ||
item { | ||
SpacerHorizontal( | ||
width = width, | ||
) | ||
} | ||
} | ||
|
||
public fun LazyListScope.spacerVertical( | ||
height: Dp, | ||
) { | ||
item { | ||
SpacerVertical( | ||
height = height, | ||
) | ||
} | ||
} |