Skip to content

Commit

Permalink
Fix text style on selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Agarwal committed Aug 8, 2024
1 parent 0b0cc1a commit f2d8e9f
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.hisp.dhis.mobile.ui.designsystem.component.navigationBar.NavigationBa
import org.hisp.dhis.mobile.ui.designsystem.component.navigationBar.NavigationBarTestTags.NAVIGATION_BAR_ITEM_BADGE_PREFIX
import org.hisp.dhis.mobile.ui.designsystem.component.navigationBar.NavigationBarTestTags.NAVIGATION_BAR_ITEM_LABEL_PREFIX
import org.hisp.dhis.mobile.ui.designsystem.component.navigationBar.NavigationBarTestTags.NAVIGATION_BAR_ITEM_PREFIX
import org.hisp.dhis.mobile.ui.designsystem.resource.provideFontResource
import org.hisp.dhis.mobile.ui.designsystem.theme.Outline
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor
Expand Down Expand Up @@ -55,17 +56,15 @@ fun NavigationBar(
},
label = {
Text(
style = MaterialTheme.typography.labelMedium.copy(
fontWeight = if (selected) {
FontWeight.SemiBold
} else {
FontWeight.Medium
},
),
color = if (selected) {
TextColor.OnSurface
style = if (selected) {
MaterialTheme.typography.labelMedium.copy(
fontFamily = provideFontResource("roboto_bold"),
fontWeight = FontWeight.Bold,
)
} else {
TextColor.OnSurfaceVariant
MaterialTheme.typography.labelMedium.copy(
color = TextColor.OnSurfaceVariant,
)
},
modifier = Modifier.testTag("$NAVIGATION_BAR_ITEM_LABEL_PREFIX${item.label}"),
text = item.label,
Expand Down

0 comments on commit f2d8e9f

Please sign in to comment.