Skip to content

Commit 1e100bd

Browse files
committed
react: BannerAlert.constants derive severity from shared and set default via BannerAlertSeverity.Info
1 parent 096fd41 commit 1e100bd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/design-system-react/src/components/BannerAlert/BannerAlert.constants.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { BannerAlertSeverity } from '@metamask/design-system-shared';
12
import { BoxBackgroundColor, IconColor, IconName, IconSize } from '../../types';
23

3-
type BannerAlertSeverityType = 'info' | 'success' | 'warning' | 'danger';
4+
type BannerAlertSeverityType =
5+
(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity];
46

5-
export const DEFAULT_BANNER_ALERT_SEVERITY: BannerAlertSeverityType = 'info';
7+
export const DEFAULT_BANNER_ALERT_SEVERITY = BannerAlertSeverity.Info;
68

79
export const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<
810
BannerAlertSeverityType,

0 commit comments

Comments
 (0)