Skip to content
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

feat: add number badge border design tokens #2482

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions .changeset/good-rice-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@utrecht/number-badge-css": minor
"@utrecht/components": minor
"@utrecht/component-library-css": minor
"@utrecht/component-library-react": minor
"@utrecht/component-library-vue": minor
"@utrecht/web-component-library-stencil": minor
---

Add `utrecht.number-badge.border-color` and `utrecht.number-badge.border-width` design tokens.
2 changes: 2 additions & 0 deletions components/number-badge/src/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
@mixin utrecht-number-badge {
/* Limit size to `max-content`, so the badge will not be stretched out of proportion inside a flexbox */
background-color: var(--utrecht-number-badge-background-color, var(--utrecht-badge-background-color, hsl(0 0% 0%)));
border-color: var(--utrecht-number-badge-border-color, var(--utrecht-badge-border-color));
border-radius: var(--utrecht-number-badge-border-radius, var(--utrecht-badge-border-radius, 0.5ch));
border-width: var(--utrecht-number-badge-border-width, var(--utrecht-badge-border-width, 0));
color: var(--utrecht-number-badge-color, var(--utrecht-badge-color, hsl(0 0% 100%)));
display: inline-block;
font-family: var(
Expand Down
24 changes: 22 additions & 2 deletions components/number-badge/src/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"utrecht": {
"number-badge": {
"background-color": {
"comment": "Default background color for badge components",
"$extensions": {
"nl.nldesignsystem.css.property": {
"syntax": "<color>",
Expand All @@ -13,8 +12,18 @@
},
"type": "color"
},
"border-color": {
"$extensions": {
"nl.nldesignsystem.css.property": {
"syntax": "<color>",
"inherits": true
},
"nl.nldesignsystem.fallback": ["utrecht.badge.border-color"],
"nl.nldesignsystem.figma.supports-token": true
},
"type": "color"
},
"border-radius": {
"comment": "Default corner radius for badge components",
"$extensions": {
"nl.nldesignsystem.css.property": {
"syntax": "<length-percentage>",
Expand All @@ -25,6 +34,17 @@
},
"type": "borderRadius"
},
"border-width": {
"$extensions": {
"nl.nldesignsystem.css.property": {
"syntax": "<length>",
"inherits": true
},
"nl.nldesignsystem.fallback": ["utrecht.badge.border-width"],
"nl.nldesignsystem.figma.supports-token": true
},
"type": "borderWidth"
},
"color": {
"comment": "Default text color for badge components",
"$extensions": {
Expand Down
Loading