Skip to content

Commit

Permalink
Apply dynamic color on badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanarodr committed May 2, 2024
1 parent 8388ffc commit 0186b71
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import br.com.stonks.designsystem.tokens.ColorToken
import br.com.stonks.designsystem.tokens.SpacingToken
import br.com.stonks.feature.home.R
import br.com.stonks.feature.home.domain.model.PortfolioModel
import br.com.stonks.feature.home.domain.model.getColor
import br.com.stonks.feature.home.domain.types.PortfolioType

@Composable
Expand Down Expand Up @@ -59,7 +60,7 @@ internal fun PortfolioCard(
TagLayout(
modifier = Modifier
.padding(end = SpacingToken.md),
containerColor = ColorToken.HighlightPurple,
containerColor = portfolio.portfolioType.getColor(),
contentColor = ColorToken.NeutralWhite,
label = portfolio.allocation.formatPercent(),
)
Expand Down

0 comments on commit 0186b71

Please sign in to comment.