{
"devDependencies": {
"nuxt": "3.0.0-rc.13"
},
}
<script setup lang="ts">
interface Props {
emoji: string;
}
const Props = withDefaults(defineProps<Props>(), {
emoji: ''
})
const emoji = computed(() => {
const e = Props.emoji
if (e === 'commit') {
return '🎉'
} else {
return '📚'
}
})
</script>
<template>
<span>{{ emoji }}</span>
</template>
<template>
<Emoji emoji="commit" />
</template>