Add label prop

This commit is contained in:
Sam Carlton 2022-07-31 10:32:12 -05:00
parent 1ca99a8427
commit a0beffe401

View file

@ -1,5 +1,4 @@
<template> <template>
<a <a
:href="href" :href="href"
:target="target" :target="target"
@ -7,9 +6,11 @@
:class="classlist" :class="classlist"
role="button" role="button"
> >
<slot /> <span v-if="label.trim().length > 0">
{{ label }}
</span>
<slot name="label" />
</a> </a>
</template> </template>
<script> <script>
@ -20,6 +21,10 @@ export default {
type: String, type: String,
required: true required: true
}, },
label: {
type: String,
default: ''
},
target: { target: {
type: String, type: String,
default: null default: null