Skip to content

fix: update presentation of beta badges for organizations UI #14806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: make badges capitalized
  • Loading branch information
Parkreiner committed Sep 25, 2024
commit 461f898faaf0134b68fb8726ebe2f79ef082f84f
11 changes: 10 additions & 1 deletion site/src/components/FeatureStageBadge/FeatureStageBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export const FeatureStageBadge: FC<FeatureStageBadgeProps> = ({
{...delegatedProps}
>
<span style={visuallyHidden}> (This is a</span>
{featureStageBadgeTypes[contentType]}
<span css={styles.badgeLabel}>
{featureStageBadgeTypes[contentType]}
</span>
<span style={visuallyHidden}> feature)</span>
</span>
)}
Expand Down Expand Up @@ -99,6 +101,13 @@ const styles = {
backgroundColor: theme.branding.featureStage.hover.background,
}),

badgeLabel: {
// Have to set display mode to anything other than inline, or else the
// CSS capitalization algorithm won't capitalize the element
display: "inline-block",
textTransform: "capitalize",
},

badgeLargeText: {
fontSize: "1rem",
},
Expand Down