Skip to content

Commit

Permalink
add light text button style
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Oct 6, 2023
1 parent eae4495 commit 74a913c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ fun Button(
paddingValues = paddingValues,
)
}
ButtonStyle.TEXT -> {
val textColor = if (enabled) SurfaceColor.Primary else TextColor.OnDisabledSurface
ButtonStyle.TEXT, ButtonStyle.TEXT_LIGHT -> {
val textColor = when {
!enabled -> TextColor.OnDisabledSurface
style == ButtonStyle.TEXT_LIGHT -> TextColor.OnPrimary
else -> SurfaceColor.Primary
}
CompositionLocalProvider(LocalRippleTheme provides Ripple.CustomDHISRippleTheme) {
OutlinedButton(
modifier = modifier,
Expand Down Expand Up @@ -311,6 +315,7 @@ enum class ButtonStyle {
FILLED,
OUTLINED,
TEXT,
TEXT_LIGHT,
ELEVATED,
TONAL,
KEYBOARDKEY,
Expand Down

0 comments on commit 74a913c

Please sign in to comment.