wf4/app/components/Button.vue
webfussel 9642496e5a FIX: mpa, nuxt4 future, improvements in intro and services
Added mpa support, nuxt4 future compatibility, improvements in intro and services
2025-02-21 13:33:50 +01:00

29 lines
492 B
Vue

<template>
<component :is="type" v-bind="actualProps()" class="Button" :class="[design]">
<slot />
</component>
</template>
<script setup lang="ts">
type Props = {
type ?: 'a' | 'button'
href ?: string
design ?: string
}
const {
type = 'a',
href = '#',
design = 'default',
} = defineProps<Props>()
const actualProps = () => {
if (type === 'a') {
return {
href: href,
target: href!.startsWith('https://') ? '_blank' : undefined,
}
}
}
</script>