feat(SW-498): Added Alert component
This commit is contained in:
17
components/TempDesignSystem/Alert/utils.ts
Normal file
17
components/TempDesignSystem/Alert/utils.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { InfoCircleIcon } from "@/components/Icons"
|
||||
import CrossCircleIcon from "@/components/Icons/CrossCircle"
|
||||
import WarningTriangleIcon from "@/components/Icons/WarningTriangle"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
export function getIconByAlertType(alertType: AlertTypeEnum) {
|
||||
switch (alertType) {
|
||||
case AlertTypeEnum.Alarm:
|
||||
return CrossCircleIcon
|
||||
case AlertTypeEnum.Warning:
|
||||
return WarningTriangleIcon
|
||||
case AlertTypeEnum.Info:
|
||||
default:
|
||||
return InfoCircleIcon
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user