Add button component
This commit is contained in:
parent
0afd5005a4
commit
31aa78b4bd
|
@ -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>
|
Reference in New Issue