Files
nuxt-portfolio/app/components/ButtonLink.vue
2025-12-02 16:31:50 +01:00

23 lines
547 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 btn-outline ${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>