Add button component

This commit is contained in:
kolaente 2021-01-17 14:36:40 +01:00
parent 0afd5005a4
commit 31aa78b4bd
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<template>
<a
class="button"
:class="{
'is-primary': type === 'primary',
'is-outlined': type === 'secondary',
'is-text is-inverted has-no-shadow underline-none': type === 'tertary',
}"
@click="e => $emit('click', e)"
>
<icon :icon="icon" v-if="icon !== ''"/>
<slot></slot>
</a>
</template>
<script>
export default {
name: 'x-button',
props: {
type: {
type: String,
default: 'primary',
},
icon: {
type: String,
default: '',
},
},
}
</script>