2026-04-16 16:20:52 -05:00
|
|
|
<script lang="ts" setup>
|
2026-04-16 17:58:28 -05:00
|
|
|
const props = defineProps<{
|
2026-04-16 16:20:52 -05:00
|
|
|
buttonText: string
|
2026-04-16 17:58:28 -05:00
|
|
|
buttonColor?: 'primary' | 'warning' | 'danger'
|
2026-04-16 16:20:52 -05:00
|
|
|
}>()
|
|
|
|
|
|
2026-04-16 17:58:28 -05:00
|
|
|
const buttonColor = computed(() => props.buttonColor || 'primary')
|
|
|
|
|
|
2026-04-16 16:20:52 -05:00
|
|
|
const emit = defineEmits(['action'])
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-04-16 17:58:28 -05:00
|
|
|
<button
|
|
|
|
|
:style="{ 'background-color': `var(--color-button-${buttonColor})` }"
|
|
|
|
|
@click="emit('action')"
|
|
|
|
|
>
|
|
|
|
|
{{ buttonText }}
|
|
|
|
|
</button>
|
2026-04-16 16:20:52 -05:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
button {
|
|
|
|
|
padding: 0.5rem 1rem;
|
|
|
|
|
border-radius: 0.25rem;
|
|
|
|
|
color: var(--color-action-button-text);
|
|
|
|
|
border: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
</style>
|