Skip to content

Commit d06cb68

Browse files
Afsal102Afzal
andauthored
feat: add branding variant to badge (#1080)
Co-authored-by: Afzal <afzal@glints.com>
1 parent c9d5d1f commit d06cb68

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/@next/Badge/Badge.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const badgeStatusVariant = [
1313
'enticing',
1414
'attention',
1515
'primary',
16+
'branding',
1617
] as const;
1718

1819
export type BadgeStatusVariant = (typeof badgeStatusVariant)[number];

src/@next/Badge/BadgeStyle.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const badgeBackgroundColor: {
1717
['enticing']: Orange.S87,
1818
['attention']: Red.B93,
1919
['primary']: Blue.S99,
20+
['branding']: Blue.Brand,
2021
};
2122

2223
export const badgeTextColor: {
@@ -32,6 +33,7 @@ export const badgeTextColor: {
3233
['enticing']: Neutral.B100,
3334
['attention']: Neutral.B100,
3435
['primary']: Neutral.B100,
36+
['branding']: Neutral.B100,
3537
};
3638

3739
const getBadgeBackgroundColor = (status: BadgeStatusVariant) => {

test/e2e/badge/badge.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ test('Badge - attention - small', async ({ page }) => {
135135
);
136136
});
137137

138+
test('Badge - branding - small', async ({ page }) => {
139+
page.setViewportSize({ width: 768, height: 600 });
140+
const badgePage = getPage(page);
141+
await badgePage.goto('args=status:branding');
142+
await expect(badgePage.container).toHaveScreenshot('branding.png');
143+
});
144+
138145
test('Badge - primary - small', async ({ page }) => {
139146
page.setViewportSize({ width: 768, height: 600 });
140147
const badgePage = getPage(page);
1.33 KB
Loading

0 commit comments

Comments
 (0)