-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
28 changes: 19 additions & 9 deletions
28
core/designsystem/src/main/java/com/susu/core/designsystem/component/badge/BadgePadding.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 |
---|---|---|
@@ -1,14 +1,24 @@ | ||
package com.susu.core.designsystem.component.badge | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.susu.core.designsystem.theme.SusuTheme | ||
data class BadgePadding( | ||
val horizontalPadding: Dp, | ||
val verticalPadding: Dp, | ||
) | ||
|
||
enum class BadgePadding( | ||
val horizontalPadding: Dp = 8.dp, | ||
val verticalPadding: Dp = 0.dp, | ||
) { | ||
SmallBadgePadding( | ||
verticalPadding = 2.dp | ||
), | ||
ExtraSmallBadgePadding, | ||
object BadgeStyle { | ||
val smallBadge: @Composable () -> BadgePadding = { | ||
BadgePadding( | ||
horizontalPadding = SusuTheme.spacing.spacing_xxs, | ||
verticalPadding = SusuTheme.spacing.spacing_xxxxxs, | ||
) | ||
} | ||
val extraSmallBadge: @Composable () -> BadgePadding = { | ||
BadgePadding( | ||
horizontalPadding = SusuTheme.spacing.spacing_xxs, | ||
verticalPadding = SusuTheme.spacing.spacing_xxxxxs, | ||
) | ||
} | ||
} |
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