style(account): make the default badge subtle

Replace the SuggestionChip (which read as a clickable button) with a small
tinted "Default" pill — labelSmall text on a secondaryContainer background,
non-interactive — so it reads as a status badge rather than an action.
This commit is contained in:
Rahul Patel
2026-06-06 01:25:39 +05:30
parent e04c5c9e87
commit 72f289d014

View File

@@ -5,6 +5,7 @@
package com.aurora.store.compose.composable
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
@@ -14,7 +15,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SuggestionChip
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
@@ -78,9 +78,17 @@ fun AccountListItem(account: Account, onClick: () -> Unit, modifier: Modifier =
)
}
if (account.isDefault) {
SuggestionChip(
onClick = onClick,
label = { Text(text = stringResource(R.string.account_default)) }
Text(
text = stringResource(R.string.account_default),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSecondaryContainer,
modifier = Modifier
.clip(CircleShape)
.background(MaterialTheme.colorScheme.secondaryContainer)
.padding(
horizontal = dimensionResource(R.dimen.spacing_small),
vertical = dimensionResource(R.dimen.spacing_xsmall)
)
)
}
}