diff --git a/libs/components/src/badge/badge.component.ts b/libs/components/src/badge/badge.component.ts index 0f8a64ee998..893257ff225 100644 --- a/libs/components/src/badge/badge.component.ts +++ b/libs/components/src/badge/badge.component.ts @@ -5,7 +5,14 @@ import { Component, ElementRef, HostBinding, Input } from "@angular/core"; import { FocusableElement } from "../shared/focusable-element"; -export type BadgeVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info"; +export type BadgeVariant = + | "primary" + | "secondary" + | "success" + | "danger" + | "warning" + | "info" + | "notification"; const styles: Record = { primary: ["tw-bg-primary-100", "tw-border-primary-700", "!tw-text-primary-700"], @@ -14,6 +21,11 @@ const styles: Record = { danger: ["tw-bg-danger-100", "tw-border-danger-700", "!tw-text-danger-700"], warning: ["tw-bg-warning-100", "tw-border-warning-700", "!tw-text-warning-700"], info: ["tw-bg-info-100", "tw-border-info-700", "!tw-text-info-700"], + notification: [ + "tw-bg-notification-100", + "tw-border-notification-600", + "!tw-text-notification-600", + ], }; const hoverStyles: Record = { @@ -27,6 +39,11 @@ const hoverStyles: Record = { danger: ["hover:tw-bg-danger-600", "hover:tw-border-danger-600", "hover:!tw-text-contrast"], warning: ["hover:tw-bg-warning-600", "hover:tw-border-warning-600", "hover:!tw-text-black"], info: ["hover:tw-bg-info-600", "hover:tw-border-info-600", "hover:!tw-text-black"], + notification: [ + "hover:tw-bg-notification-600", + "hover:tw-border-notification-600", + "hover:!tw-text-contrast", + ], }; @Component({ diff --git a/libs/components/src/badge/badge.stories.ts b/libs/components/src/badge/badge.stories.ts index bff9eec6163..6473ba8c867 100644 --- a/libs/components/src/badge/badge.stories.ts +++ b/libs/components/src/badge/badge.stories.ts @@ -36,6 +36,7 @@ export const Variants: Story = { +

Hover @@ -44,6 +45,7 @@ export const Variants: Story = { +

Focus Visible @@ -52,6 +54,7 @@ export const Variants: Story = { +

Disabled @@ -60,6 +63,7 @@ export const Variants: Story = { + `, }), }; @@ -112,6 +116,13 @@ export const Info: Story = { }, }; +export const Notification: Story = { + ...Primary, + args: { + variant: "notification", + }, +}; + export const Truncated: Story = { ...Primary, args: {