Files
nocodb/packages/nc-gui/components/general/TableIcon.vue
Pranav C 86f51736d8 refactor: update expand and eye icon
Signed-off-by: Pranav C <pranavxc@gmail.com>
2023-03-24 09:59:57 +05:30

22 lines
544 B
Vue

<script lang="ts" setup>
import { Icon as IcIcon } from '@iconify/vue'
import type { TableType } from 'nocodb-sdk'
import { iconMap } from '#imports'
const { meta: tableMeta } = defineProps<{
meta: TableType
}>()
</script>
<template>
<IcIcon
v-if="tableMeta.meta?.icon"
:data-testid="`nc-icon-${tableMeta.meta?.icon}`"
class="text-lg"
:icon="tableMeta.meta?.icon"
/>
<component :is="iconMap.eye" v-else-if="tableMeta?.type === 'view'" class="w-5" />
<component :is="iconMap.table" v-else class="w-5" />
</template>