advent22/ui/src/components/bulma/Button.vue

29 lines
569 B
Vue
Raw Normal View History

<!-- eslint-disable vue/multi-word-component-names -->
2023-09-07 15:43:05 +00:00
<template>
<button class="button">
<slot name="default">
2023-09-14 13:54:23 +00:00
<span v-if="icon !== undefined" class="icon">
<FontAwesomeIcon
v-if="icon !== undefined"
:icon="icon"
:beat-fade="busy"
/>
2023-09-14 13:54:23 +00:00
</span>
</slot>
<span v-if="text !== undefined">{{ text }}</span>
2023-09-07 15:43:05 +00:00
</button>
</template>
<script setup lang="ts">
withDefaults(
defineProps<{
icon?: string | string[];
text?: string;
busy?: boolean;
}>(),
{
busy: false,
2023-09-07 15:43:05 +00:00
},
);
2023-09-07 15:43:05 +00:00
</script>