aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-03-15 00:01:27 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-03-15 00:01:27 +0000
commit8344d1c13c6a3b04abe5d2c129ce5e8225bd44fa (patch)
tree7beb19fc8e04662ca5dcac6dd4d5c7ea78308196
parent1557c0b65cf53eca487cf11f3b70560e544bd9ed (diff)
Shut missing prop errors up
-rw-r--r--components/base/Button.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/base/Button.vue b/components/base/Button.vue
index 827e201..a53e329 100644
--- a/components/base/Button.vue
+++ b/components/base/Button.vue
@@ -11,7 +11,10 @@ const props = defineProps({
default: 'normal',
},
label: String,
- icon: Array<String>,
+ icon: {
+ type: Array<String>,
+ required: false
+ },
disabled: Boolean,
});
@@ -27,7 +30,7 @@ const onClick = (event: MouseEvent) => {
<template>
<a id="button" :class="{ text: type === 'text', solid: type === 'solid', disabled: disabled, [accent]: true }"
@click.stop="onClick">
- <font-awesome-icon :icon="icon" />
+ <font-awesome-icon :icon="icon" v-if="icon" />
{{ label }}
</a>
</template>