more ui components
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user