Browse Source

feat: add an icon component for using icon in icon map using key

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5343/head
Pranav C 1 year ago
parent
commit
93bc127812
  1. 11
      packages/nc-gui/components/general/Icon.vue

11
packages/nc-gui/components/general/Icon.vue

@ -0,0 +1,11 @@
<script lang="ts" setup>
import { iconMap } from '#imports'
const props = defineProps<{
icon: keyof typeof iconMap
}>()
</script>
<template>
<component :is="iconMap[props.icon]" class="mr-2" />
</template>
Loading…
Cancel
Save