wf4/app/components/Button.vue
webfussel a204be8ddc REMOVE: (Urban) as SEO is okay again
Removed the (Urban) which was added after marriage for better SEO
2025-03-18 12:54:31 +01:00

29 lines
492 B
Vue
Executable file

<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>