mirror of
https://github.com/YunoHost/yunohost-portal.git
synced 2024-09-03 20:06:23 +02:00
28 lines
523 B
Vue
28 lines
523 B
Vue
<script setup lang="ts">
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
variant?: string
|
|
type?: HTMLButtonElement['type']
|
|
block?: boolean
|
|
}>(),
|
|
{
|
|
variant: 'primary',
|
|
type: 'button',
|
|
block: false,
|
|
},
|
|
)
|
|
|
|
const variantClass = computed(() => {
|
|
return {
|
|
primary: 'btn-primary',
|
|
success: 'btn-success',
|
|
info: 'btn-info',
|
|
}[props.variant]
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<button class="btn" :class="[variantClass, { 'btn-block': block }]">
|
|
<slot name="default" />
|
|
</button>
|
|
</template>
|