Skip to content

Commit 8d09acc

Browse files
committed
react-native: remove unnecessary severity alias in BannerAlert for clarity
1 parent 42728d3 commit 8d09acc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • packages/design-system-react-native/src/components/BannerAlert

packages/design-system-react-native/src/components/BannerAlert/BannerAlert.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ export const BannerAlert: React.FC<BannerAlertProps> = ({
1919
twClassName,
2020
...props
2121
}) => {
22-
const resolvedSeverity = severity;
23-
const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[resolvedSeverity];
24-
const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[resolvedSeverity];
22+
const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];
23+
const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];
2524
const backgroundColor =
26-
MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[resolvedSeverity];
25+
MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];
2726
const borderColorClass =
28-
MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[resolvedSeverity] ??
27+
MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity] ??
2928
BoxBorderColor.BorderDefault;
3029
const mergedTwClassName = `border-l-4 ${borderColorClass}${
3130
twClassName ? ` ${twClassName}` : ''

0 commit comments

Comments
 (0)