main
vue 28 lines 687 Bytes
Raw
1 <template>
2 <Icon
3 :name="
4 status === 'OPEN'
5 ? WarningIcon
6 : status === 'IN_PROGRESS'
7 ? ProgressIcon
8 : status === 'CLOSED'
9 ? CheckIcon
10 : UnknownIcon
11 "
12 :size="size || 16"
13 />
14 </template>
15
16 <script setup lang="ts">
17 import type { AlertStatus } from "@/types/incidentManagement/alerts.d"
18 import { toRefs } from "vue"
19 import Icon from "@/components/common/Icon.vue"
20
21 const props = defineProps<{ status: AlertStatus | null; size?: number }>()
22 const { status, size } = toRefs(props)
23
24 const ProgressIcon = "carbon:hourglass"
25 const CheckIcon = "carbon:checkmark-outline"
26 const WarningIcon = "carbon:warning-hex"
27 const UnknownIcon = "carbon:unknown"
28 </script>