Initial commit from monorepo
This commit is contained in:
24
app/components/ui/PageHeaderAction.vue
Normal file
24
app/components/ui/PageHeaderAction.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<component
|
||||
:is="to ? NuxtLink : 'button'"
|
||||
:to="to"
|
||||
class="btn btn-sm btn-ghost gap-2"
|
||||
@click="!to && $emit('click')"
|
||||
>
|
||||
<Icon v-if="icon" :name="icon" size="16" />
|
||||
<slot />
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NuxtLink } from '#components'
|
||||
|
||||
defineProps<{
|
||||
to?: string
|
||||
icon?: string
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
(e: 'click'): void
|
||||
}>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user