Skip to content

Commit c2470f9

Browse files
committed
fix: update base styles
1 parent fb70781 commit c2470f9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

site/src/components/FeatureBadge/FeatureBadge.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { FeatureBadge } from "./FeatureBadge";
44
const meta: Meta<typeof FeatureBadge> = {
55
title: "components/FeatureBadge",
66
component: FeatureBadge,
7+
args: {
8+
type: "beta",
9+
},
710
};
811

912
export default meta;

site/src/components/FeatureBadge/FeatureBadge.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@ const styles = {
1717
// more types of HTML elements without creating invalid markdown, but we
1818
// still want the default display behavior to be div-like
1919
display: "block",
20+
21+
// Base style assumes that small badges will be the default
22+
fontSize: "0.75rem",
23+
2024
maxWidth: "fit-content",
2125
flexShrink: 0,
22-
padding: "8px 4px",
26+
padding: "4px 8px",
27+
lineHeight: 1,
28+
whiteSpace: "nowrap",
2329
border: `1px solid ${theme.palette.divider}`,
2430
color: theme.palette.text.secondary,
2531
backgroundColor: theme.palette.background.default,
2632
borderRadius: "6px",
27-
28-
// Base style assumes that small badges will be the default
29-
fontSize: "0.75rem",
3033
}),
3134

3235
highlighted: (theme) => ({

0 commit comments

Comments
 (0)