Skip to content

Commit 2235377

Browse files
authored
feat: Badge EDS 2.0 (#4999)
* feat: Badge EDS 2.0 component Closes #4791 * docs: improve Badge stories — add descriptions, fix fonts, rework MultipleLabels * docs: add Density story to Badge * fix: remove neutral-specific padding override from Badge * fix: address Badge PR review — density rules, token semantics, test queries, TS typing * fix: remove explicit comfortable density override — spacing tokens adapt automatically * fix: address Badge PR review — bolder token, outline var, inline non-overridden vars - Use --eds-typography-ui-body-sm-font-weight-bolder instead of hardcoded 500 - Introduce --_outline-color pseudo-private var to consolidate duplicated outline declarations - Inline color, padding-block, padding-inline tokens directly (no variant ever overrides them)
1 parent e3ea724 commit 2235377

9 files changed

Lines changed: 726 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import figma from '@figma/code-connect'
2+
import { Badge } from '.'
3+
4+
figma.connect(
5+
Badge,
6+
'https://www.figma.com/design/dz0XQdc5j7AAtjXr1gTfVR/%F0%9F%94%B9-EDS-Core-Components?node-id=4120-931',
7+
{
8+
props: {
9+
tone: figma.enum('Tone', {
10+
Neutral: 'neutral',
11+
Accent: 'accent',
12+
Success: 'success',
13+
Info: 'info',
14+
Warning: 'warning',
15+
Error: 'danger',
16+
}),
17+
emphasis: figma.enum('Emphasis', {
18+
Low: 'low',
19+
Medium: 'medium',
20+
}),
21+
variant: figma.enum('Style', {
22+
Solid: 'solid',
23+
Outlined: 'outlined',
24+
}),
25+
children: figma.string('Text'),
26+
},
27+
example: ({ tone, emphasis, variant, children }) => (
28+
<Badge tone={tone} emphasis={emphasis} variant={variant}>
29+
{children}
30+
</Badge>
31+
),
32+
},
33+
)

0 commit comments

Comments
 (0)