Skip to content

Commit 62983ad

Browse files
chore(badge): update styles (#3029)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent ef094db commit 62983ad

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

.changeset/wild-beans-teach.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@twilio-paste/badge': patch
3+
'@twilio-paste/core': patch
4+
---
5+
6+
[Badge] Update styles to align with new Paste Twilio theme

packages/paste-core/components/badge/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const Badge = React.forwardRef<HTMLElement, BadgeProps>(
4747
alignItems="center"
4848
as={as}
4949
border="unset"
50-
borderRadius="borderRadius30"
50+
borderRadius="borderRadius20"
5151
columnGap="space20"
5252
display="flex"
5353
element={element}

packages/paste-core/components/badge/src/styles.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,78 @@ export const badgeVariantStyles: {
77
backgroundColor: BoxStyleProps['backgroundColor'];
88
color: BoxStyleProps['color'];
99
borderRadius?: BoxStyleProps['borderRadius'];
10+
boxShadow: BoxStyleProps['boxShadow'];
1011
};
1112
} = {
1213
success: {
1314
backgroundColor: 'colorBackgroundSuccessWeakest',
1415
color: 'colorTextSuccess',
16+
boxShadow: 'shadowBorderSuccessWeaker',
1517
},
1618
error: {
1719
backgroundColor: 'colorBackgroundErrorWeakest',
18-
color: 'colorTextErrorStrong',
20+
color: 'colorTextError',
21+
boxShadow: 'shadowBorderErrorWeaker',
1922
},
2023
warning: {
2124
backgroundColor: 'colorBackgroundWarningWeakest',
22-
color: 'colorTextWarningStrong',
25+
color: 'colorTextWarning',
26+
boxShadow: 'shadowBorderWarningWeaker',
2327
},
2428
new: {
25-
backgroundColor: 'colorBackgroundNew',
29+
backgroundColor: 'colorBackgroundNewWeakest',
2630
color: 'colorTextNew',
31+
boxShadow: 'shadowBorderNewWeaker',
2732
},
2833
neutral: {
2934
backgroundColor: 'colorBackgroundNeutralWeakest',
3035
color: 'colorTextNeutral',
36+
boxShadow: 'shadowBorderNeutralWeaker',
3137
},
3238
decorative10: {
3339
backgroundColor: 'colorBackgroundDecorative10Weakest',
3440
color: 'colorTextDecorative10',
41+
boxShadow: 'shadowBorderDecorative10Weaker',
3542
},
3643
decorative20: {
3744
backgroundColor: 'colorBackgroundDecorative20Weakest',
3845
color: 'colorTextDecorative20',
46+
boxShadow: 'shadowBorderDecorative20Weaker',
3947
},
4048
decorative30: {
4149
backgroundColor: 'colorBackgroundDecorative30Weakest',
4250
color: 'colorTextDecorative30',
51+
boxShadow: 'shadowBorderDecorative30Weaker',
4352
},
4453
decorative40: {
4554
backgroundColor: 'colorBackgroundDecorative40Weakest',
4655
color: 'colorTextDecorative40',
56+
boxShadow: 'shadowBorderDecorative40Weaker',
4757
},
4858
neutral_counter: {
4959
backgroundColor: 'colorBackgroundNeutralWeakest',
5060
color: 'colorTextNeutral',
5161
borderRadius: 'borderRadiusPill',
62+
boxShadow: 'shadowBorderNeutralWeaker',
5263
},
5364
error_counter: {
5465
backgroundColor: 'colorBackgroundErrorWeakest',
55-
color: 'colorTextErrorStrong',
66+
color: 'colorTextError',
5667
borderRadius: 'borderRadiusPill',
68+
boxShadow: 'shadowBorderErrorWeaker',
5769
},
58-
// the following variants are outdated but still supported to prevent breaking changes
70+
/*
71+
* the following variants are outdated but still supported to prevent breaking changes
72+
*/
5973
default: {
6074
backgroundColor: 'colorBackground',
6175
color: 'colorTextWeak',
76+
boxShadow: 'shadowBorderDecorative10Weaker',
6277
},
6378
info: {
6479
backgroundColor: 'colorBackgroundNeutralWeakest',
6580
color: 'colorTextNeutral',
81+
boxShadow: 'shadowBorderNeutralWeaker',
6682
},
6783
};
6884

0 commit comments

Comments
 (0)