Tabs: Don't explicitly set text color in the text (#8365)

The container already provides color option for both states
This commit is contained in:
Ivan Iskandar
2022-10-30 23:04:46 +07:00
committed by GitHub
parent 57bba9e5ab
commit 156191af44
4 changed files with 22 additions and 27 deletions
@@ -30,17 +30,13 @@ fun TabIndicator(currentTabPosition: TabPosition) {
fun TabText(
text: String,
badgeCount: Int? = null,
isCurrentPage: Boolean,
) {
val pillAlpha = if (isSystemInDarkTheme()) 0.12f else 0.08f
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = text,
color = if (isCurrentPage) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onBackground,
)
Text(text = text)
if (badgeCount != null) {
Pill(
text = "$badgeCount",