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