23 lines
536 B
Vue
23 lines
536 B
Vue
<script setup lang="ts">
|
|
const { to, text, icon = undefined, color = undefined } = defineProps<{
|
|
to: string,
|
|
text: string,
|
|
icon?: string
|
|
color?: string
|
|
}>()
|
|
|
|
const buttonClass = ref(`btn ${color ? color : "btn-primary"}`)
|
|
</script>
|
|
|
|
<template>
|
|
<button :class="buttonClass">
|
|
<NuxtLink :to="to" class=" flex flex-row items-center justify-center gap-2">
|
|
<Icon v-if="icon" :name="icon" class="w-6 h-6" />
|
|
{{ text }}
|
|
</NuxtLink>
|
|
</button>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style> |