refactor: remove unnecessary check for slot contents
This commit is contained in:
committed by
Andrew Bastin
parent
40b9508361
commit
019c2cec46
@@ -8,9 +8,7 @@
|
||||
:class="large ? 'w-32 h-32' : 'w-16 h-16'"
|
||||
:alt="alt"
|
||||
/>
|
||||
<template v-if="hasIcon">
|
||||
<slot name="icon"></slot>
|
||||
</template>
|
||||
<slot name="icon"></slot>
|
||||
<span v-if="heading" class="font-semibold mt-2 text-center">
|
||||
{{ heading }}
|
||||
</span>
|
||||
@@ -45,10 +43,6 @@ withDefaults(
|
||||
|
||||
const slots = useSlots()
|
||||
|
||||
const hasIcon = computed(() => {
|
||||
return !!slots.icon
|
||||
})
|
||||
|
||||
const hasBody = computed(() => {
|
||||
return !!slots.body
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user