more ui components

This commit is contained in:
2023-05-26 19:21:27 +02:00
parent 2088b12242
commit dd811c3f66
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>