| 1 | <template> |
| 2 | <Icon :name="platformIcon" :size /> |
| 3 | </template> |
| 4 | |
| 5 | <script setup lang="ts"> |
| 6 | import { computed } from "vue" |
| 7 | import Icon from "@/components/common/Icon.vue" |
| 8 | import { getOS, iconFromOs } from "@/utils" |
| 9 | |
| 10 | const { platform, size = 14 } = defineProps<{ platform: string; size?: number }>() |
| 11 | |
| 12 | const platformIcon = computed(() => iconFromOs(getOS(platform))) |
| 13 | </script> |