wf4/app/components/Button.vue
webfussel f263a5574a ADD: A LOT of pricing chart stuff
Added new pricing chart layout
2025-03-19 15:03:11 +01:00

29 lines
514 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 ?: 'default' | 'dark' | 'white'
}
const {
type = 'a',
href = '#',
design = 'default',
} = defineProps<Props>()
const actualProps = () => {
if (type === 'a') {
return {
href: href,
target: href!.startsWith('https://') ? '_blank' : undefined,
}
}
}
</script>