more ui components

This commit is contained in:
Marco Crapts
2023-05-26 19:21:27 +02:00
parent 7c1e74ff39
commit 41390233c1
6 changed files with 57 additions and 16 deletions

View File

@@ -3,12 +3,14 @@ interface Props {
size?: string
variant?: 'regular' | 'outline'
color?: string
dropdown?: boolean
}
const props = withDefaults(defineProps<Props>(), {
size: 'md',
variant: 'regular',
color: 'regular'
color: 'regular',
dropdown: false
})
const styleClass = computed(() => {
@@ -19,5 +21,8 @@ const styleClass = computed(() => {
})
</script>
<template>
<button class="btn duration-0" :class="styleClass"><slot></slot></button>
<label class="btn duration-0" :class="styleClass" v-if="props.dropdown" tabindex="0">
<slot></slot>
</label>
<button class="btn duration-0" :class="styleClass" v-else><slot></slot></button>
</template>