Skip to content

Commit

Permalink
Add small improvements to playground (stripe#7168)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswoo-stripe authored Aug 17, 2023
1 parent b1adc81 commit 9ef6ea0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
Expand Down Expand Up @@ -40,7 +41,7 @@ fun MultiToggleButton(
toggleStates.forEachIndexed { index, toggleState ->
val isSelected = currentSelection.lowercase() == toggleState.lowercase()
val backgroundTint = if (isSelected) selectedTint else unselectedTint
val textColor = if (isSelected) Color.White else Color.Unspecified
val textColor = if (isSelected) Color.White else MaterialTheme.colors.onBackground
val shape = RoundedCornerShape(
topStart = if (index == 0) 4.dp else 0.dp,
bottomStart = if (index == 0) 4.dp else 0.dp,
Expand Down Expand Up @@ -78,6 +79,7 @@ fun MultiToggleButton(
}
)
.padding(vertical = 4.dp, horizontal = 8.dp)
.defaultMinSize(minWidth = 48.dp)
)
}
}
Expand Down

0 comments on commit 9ef6ea0

Please sign in to comment.