mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
16 lines
337 B
Vue
16 lines
337 B
Vue
<script setup lang="ts">
|
|
const props = defineProps(["btnText", "btnID"]);
|
|
|
|
function emitClick() {
|
|
window.dispatchEvent(new CustomEvent("add-widget", { detail: props.btnID }));
|
|
}
|
|
</script>
|
|
<template>
|
|
<button
|
|
class="btn btn-small btn-outline-secondary mb-1"
|
|
v-on:click="emitClick"
|
|
>
|
|
{{ btnText }}
|
|
</button>
|
|
</template>
|