fix(lite/UiBadge): do not instanciate FontAwesomeIcon if icon is undefined (#6446)

This commit is contained in:
Pierre Donias 2022-10-06 10:34:49 +02:00 committed by Julien Fontanet
parent 72a3a9f04f
commit 2512a00205

View File

@ -1,12 +1,13 @@
<template> <template>
<span class="ui-badge"> <span class="ui-badge">
<FontAwesomeIcon :icon="icon" /> <UiIcon :icon="icon" />
<slot /> <slot />
</span> </span>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import type { IconDefinition } from "@fortawesome/fontawesome-common-types"; import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
import UiIcon from "@/components/ui/UiIcon.vue";
defineProps<{ defineProps<{
icon?: IconDefinition; icon?: IconDefinition;