8000 feat: add UI badges for labeling beta features by lizard-boy · Pull Request #11 · grepdemos/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add UI badges for labeling beta features #11

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
fix: update base styles
  • Loading branch information
Parkreiner committed Sep 12, 2024
commit c2470f97f5868964494e4667c785f2a1d3f2ac14
3 changes: 3 additions & 0 deletions site/src/components/FeatureBadge/FeatureBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { FeatureBadge } from "./FeatureBadge";
const meta: Meta<typeof FeatureBadge> = {
title: "components/FeatureBadge",
component: FeatureBadge,
args: {
type: "beta",
},
};

export default meta;
Expand Down
11 changes: 7 additions & 4 deletions site/src/components/FeatureBadge/FeatureBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ const styles = {
// more types of HTML elements without creating invalid markdown, but we
// still want the default display behavior to be div-like
display: "block",

// Base style assumes that small badges will be the default
fontSize: "0.75rem",

maxWidth: "fit-content",
flexShrink: 0,
padding: "8px 4px",
padding: "4px 8px",
lineHeight: 1,
whiteSpace: "nowrap",
border: `1px solid ${theme.palette.divider}`,
color: theme.palette.text.secondary,
backgroundColor: theme.palette.background.default,
borderRadius: "6px",

// Base style assumes that small badges will be the default
fontSize: "0.75rem",
}),

highlighted: (theme) => ({
Expand Down
0