Skip to content

Commit

Permalink
Merge pull request #1029 from glints-dev/feature/badge-variant
Browse files Browse the repository at this point in the history
feat: adds badge success bright variant
  • Loading branch information
Afsal102 authored Jun 4, 2024
2 parents 0a805c1 + 4bddf6e commit 72745f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/@next/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BadgeStyle, badgeTextColor } from './BadgeStyle';
const badgeStatusVariant = [
'neutral',
'success',
'successBright',
'information',
'warning',
'critical',
Expand Down
2 changes: 2 additions & 0 deletions src/@next/Badge/BadgeStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const badgeBackgroundColor: {
} = {
['neutral']: Neutral.B95,
['success']: Green.B89,
['successBright']: Green.B61,
['information']: Blue.S08,
['warning']: Orange.S21,
['critical']: Red.B100,
Expand All @@ -23,6 +24,7 @@ export const badgeTextColor: {
} = {
['neutral']: Neutral.B18,
['success']: Neutral.B18,
['successBright']: Neutral.B100,
['information']: Neutral.B18,
['warning']: Neutral.B18,
['critical']: Neutral.B18,
Expand Down
8 changes: 8 additions & 0 deletions test/e2e/badge/badge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ test('Badge - success', async ({ page }) => {
await expect(badgePage.container).toHaveScreenshot('badge-success.png');
});

test('Badge - success bright', async ({ page }) => {
const badgePage = getPage(page);
await badgePage.goto('args=status:successBright');
await expect(badgePage.container).toHaveScreenshot(
'badge-success-bright.png'
);
});

test('Badge - warning', async ({ page }) => {
const badgePage = getPage(page);
await badgePage.goto('args=status:warning');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 72745f6

Please sign in to comment.