Skip to content

Commit 77e938e

Browse files
ZuzzeSusanna Nevalainen
andauthored
fix(components): warning Tag variant and token added (#1719)
* fix(components): add Tag variant * fix(components): changeset added * fix(tokens): snapshot test updated to include new warning feedback color tokens * fix(components): add Tag variant * fix(components): changeset added * fix(tokens): snapshot test updated to include new warning feedback color tokens * fix(components): use white bg only for multiple selection mode to avoid overriding original bg --------- Co-authored-by: Susanna Nevalainen <[email protected]>
1 parent a0c88cf commit 77e938e

File tree

7 files changed

+30
-1
lines changed

7 files changed

+30
-1
lines changed

.changeset/stupid-cases-wink.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@launchpad-ui/components": minor
3+
"@launchpad-ui/tokens": minor
4+
---
5+
6+
Warning feedback tokens and Tag warning variant added

packages/components/src/TagGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const tagStyles = cva(styles.tag, {
3636
federal: styles.federal,
3737
new: styles.new,
3838
info: styles.info,
39+
warning: styles.warning,
3940
},
4041
},
4142
defaultVariants: {

packages/components/src/styles/TagGroup.module.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
color: var(--lp-color-text-interactive-disabled);
3131
}
3232

33-
&[data-selection-mode] {
33+
&[data-selection-mode='multiple'] {
3434
background-color: var(--lp-color-bg-interactive-secondary-base);
3535
border: 1px solid var(--lp-color-border-interactive-secondary-base);
3636
}
@@ -71,6 +71,11 @@
7171
background-color: var(--lp-color-bg-feedback-error);
7272
}
7373

74+
.warning {
75+
color: var(--lp-color-text-feedback-warning);
76+
background-color: var(--lp-color-bg-feedback-warning);
77+
}
78+
7479
.beta {
7580
color: var(--lp-color-text-product-beta);
7681
background-color: var(--lp-color-bg-product-beta);

packages/components/stories/TagGroup.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export const Variants: Story = {
9797
<TagList>
9898
<Tag>Default</Tag>
9999
<Tag variant="success">Success</Tag>
100+
<Tag variant="warning">Warning</Tag>
100101
<Tag variant="error">Error</Tag>
101102
<Tag variant="beta">Beta</Tag>
102103
<Tag variant="federal">Federal</Tag>

packages/tokens/__tests__/__snapshots__/tokens.spec.ts.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports[`Tokens > builds dark tokens 1`] = `
1919
--lp-color-bg-feedback-error: var(--lp-color-red-900);
2020
--lp-color-bg-feedback-info: var(--lp-color-blue-900);
2121
--lp-color-bg-feedback-success: var(--lp-color-green-900);
22+
--lp-color-bg-feedback-warning: var(--lp-color-brand-orange-dark);
2223
--lp-color-bg-interactive-primary-base: var(--lp-color-blue-600);
2324
--lp-color-bg-interactive-primary-active: var(--lp-color-blue-600);
2425
--lp-color-bg-interactive-primary-focus: var(--lp-color-blue-500);
@@ -56,6 +57,7 @@ exports[`Tokens > builds dark tokens 1`] = `
5657
--lp-color-text-feedback-error: var(--lp-color-red-400);
5758
--lp-color-text-feedback-success: var(--lp-color-green-400);
5859
--lp-color-text-feedback-info: var(--lp-color-blue-400);
60+
--lp-color-text-feedback-warning: var(--lp-color-brand-orange-light);
5961
--lp-color-text-interactive-base: var(--lp-color-blue-400);
6062
--lp-color-text-interactive-active: var(--lp-color-purple-400);
6163
--lp-color-text-interactive-secondary: var(--lp-color-gray-400);
@@ -210,6 +212,7 @@ exports[`Tokens > builds default tokens 1`] = `
210212
--lp-color-bg-feedback-error: var(--lp-color-red-50);
211213
--lp-color-bg-feedback-info: var(--lp-color-blue-50);
212214
--lp-color-bg-feedback-success: var(--lp-color-green-50);
215+
--lp-color-bg-feedback-warning: var(--lp-color-brand-orange-light);
213216
--lp-color-bg-interactive-primary-base: var(--lp-color-blue-500);
214217
--lp-color-bg-interactive-primary-active: var(--lp-color-blue-500);
215218
--lp-color-bg-interactive-primary-focus: var(--lp-color-blue-600);
@@ -254,6 +257,7 @@ exports[`Tokens > builds default tokens 1`] = `
254257
--lp-color-text-feedback-error: var(--lp-color-red-600);
255258
--lp-color-text-feedback-success: var(--lp-color-green-600);
256259
--lp-color-text-feedback-info: var(--lp-color-blue-600);
260+
--lp-color-text-feedback-warning: var(--lp-color-brand-orange-dark);
257261
--lp-color-text-interactive-base: var(--lp-color-blue-600);
258262
--lp-color-text-interactive-active: var(--lp-color-purple-700);
259263
--lp-color-text-interactive-primary-base: var(--lp-color-white-950);

packages/tokens/tokens/color-aliases.dark.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
},
1212
"success": {
1313
"$value": "{color.green.900}"
14+
},
15+
"warning": {
16+
"$value": "{color.brand.orange.dark}"
1417
}
1518
},
1619
"interactive": {
@@ -175,6 +178,9 @@
175178
},
176179
"info": {
177180
"$value": "{color.blue.400}"
181+
},
182+
"warning": {
183+
"$value": "{color.brand.orange.light}"
178184
}
179185
},
180186
"interactive": {

packages/tokens/tokens/color-aliases.default.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
},
2222
"success": {
2323
"$value": "{color.green.50}"
24+
},
25+
"warning": {
26+
"$value": "{color.brand.orange.light}"
2427
}
2528
},
2629
"interactive": {
@@ -299,6 +302,9 @@
299302
},
300303
"info": {
301304
"$value": "{color.blue.600}"
305+
},
306+
"warning": {
307+
"$value": "{color.brand.orange.dark}"
302308
}
303309
},
304310
"interactive": {

0 commit comments

Comments
 (0)