Skip to content

Commit

Permalink
Merge pull request #30 from kiwicom/badge_stroke
Browse files Browse the repository at this point in the history
badge: lighter border for subtle version
  • Loading branch information
hrach committed Sep 17, 2021
2 parents d36ace5 + 68afa87 commit 3c917c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/src/main/java/kiwi/orbit/compose/ui/controls/Badge.kt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ private fun Badge(
ThemedSurface(
subtle = subtle,
shape = RoundedCornerShape(percent = 50),
strokeWidth = 0.5.dp,
modifier = modifier.requiredHeight(24.dp),
verticalAlignment = Alignment.CenterVertically,
contentPadding = PaddingValues(vertical = 2.dp, horizontal = 8.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import kiwi.orbit.compose.ui.OrbitTheme
import kiwi.orbit.compose.ui.foundation.LocalContentColor
Expand All @@ -23,6 +24,7 @@ public fun ThemedSurface(
subtle: Boolean,
modifier: Modifier = Modifier,
shape: Shape = OrbitTheme.shapes.normal,
strokeWidth: Dp = 1.dp,
horizontalArrangement: Arrangement.Horizontal = Arrangement.Start,
verticalAlignment: Alignment.Vertical = Alignment.Top,
contentPadding: PaddingValues = PaddingValues(),
Expand All @@ -36,7 +38,7 @@ public fun ThemedSurface(
val surfaceModifier = when (subtle) {
true -> {
Modifier
.border(1.dp, OrbitTheme.colors.surface.strong, shape)
.border(strokeWidth, OrbitTheme.colors.surface.strong, shape)
.background(backgroundColor, shape)
}
false -> {
Expand Down

0 comments on commit 3c917c0

Please sign in to comment.