25 lines
630 B
Vue
25 lines
630 B
Vue
<script setup lang="ts">
|
|
type ClickType = 'cancel' | 'draft' | 'submit'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'click', type: ClickType): void
|
|
}>()
|
|
|
|
function onClick(type: ClickType) {
|
|
emit('click', type)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="m-2 flex gap-2 px-2">
|
|
<Button class="bg-gray-400" type="button" @click="onClick('cancel')">
|
|
<Icon name="i-lucide-arrow-left" class="me-2 align-middle" />
|
|
Back
|
|
</Button>
|
|
<Button class="bg-orange-500" variant="outline" type="button" @click="onClick('draft')">
|
|
<Icon name="i-lucide-file" class="me-2 align-middle" />
|
|
Edit
|
|
</Button>
|
|
</div>
|
|
</template>
|