18 lines
522 B
TypeScript
18 lines
522 B
TypeScript
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
|
|
}
|
|
}
|