Skip to content

Commit

Permalink
Merge pull request #20604 from wordpress-mobile/feature/reader-custom…
Browse files Browse the repository at this point in the history
…ization-experimental-badge

[Reader Customization] Add Experimental badge
  • Loading branch information
Thomas Horta authored Apr 8, 2024
2 parents a22d98c + d74a6f5 commit eca806c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ fun ReadingPreferencesScreen(
onNavigationIconClick = onCloseClick,
backgroundColor = backgroundColor,
contentColor = baseTextColor,
actions = {
ExperimentalBadge(
contentColor = textColor,
fontFamily = fontFamily,
modifier = Modifier.padding(end = Margin.Large.value),
)
}
)

// Preview section
Expand Down Expand Up @@ -232,6 +239,23 @@ fun ReadingPreferencesScreen(
}
}

@Composable
private fun ExperimentalBadge(
contentColor: Color,
fontFamily: FontFamily,
modifier: Modifier = Modifier,
) {
Text(
text = stringResource(R.string.experimental_badge),
modifier = modifier,
style = TextStyle(
color = contentColor.copy(alpha = 0.6f),
fontWeight = FontWeight.Medium,
fontFamily = fontFamily,
),
)
}

@Composable
private fun ReadingPreferencesPreviewFeedback(
onSendFeedbackClick: () -> Unit,
Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
<string name="me">Me</string>
<string name="everyone">Everyone</string>

<string name="experimental_badge">&lt;Experimental&gt;</string>

<!-- CAB -->
<string name="cab_selected">%d selected</string>

Expand Down

0 comments on commit eca806c

Please sign in to comment.