32 lines
638 B
Vue
32 lines
638 B
Vue
<script setup lang="ts">
|
|
import {Link} from "@inertiajs/vue3";
|
|
type Method = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
defineProps<{
|
|
href: string | {
|
|
url: string;
|
|
method: Method;
|
|
},
|
|
label: string;
|
|
icon?: string;
|
|
variant?: "flat" | "text" | "elevated" | "outlined" | "plain" | "tonal" | undefined
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<Link :href="href">
|
|
<v-btn
|
|
style="width:100%;"
|
|
:prepend-icon="icon"
|
|
:variant="variant"
|
|
>
|
|
{{ label }}
|
|
</v-btn>
|
|
</Link>
|
|
</template>
|
|
<style scoped>
|
|
a{
|
|
width: 100%;
|
|
display: block;
|
|
}
|
|
</style>
|