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

31 lines
552 B
Vue
Raw Normal View History

2023-09-07 15:43:05 +00:00
<template>
<button class="button">
2023-09-07 17:32:53 +00:00
<span v-if="icon !== undefined" class="icon">
<font-awesome-icon :icon="icon" />
2023-09-07 15:43:05 +00:00
</span>
2023-09-10 00:10:11 +00:00
<span v-if="text !== ''">{{ text }}</span>
2023-09-07 15:43:05 +00:00
</button>
</template>
<script lang="ts">
import { Options, Vue } from "vue-class-component";
@Options({
props: {
2023-09-07 16:51:19 +00:00
icon: {
type: String,
required: false,
},
2023-09-09 22:43:11 +00:00
text: {
type: String,
required: false,
default: "",
},
2023-09-07 15:43:05 +00:00
},
})
export default class extends Vue {
2023-09-07 16:51:19 +00:00
public icon?: string;
2023-09-09 22:43:11 +00:00
public text?: string;
2023-09-07 15:43:05 +00:00
}
</script>