26 lines
869 B
Vue
26 lines
869 B
Vue
<script setup>
|
|
import { computed } from "vue";
|
|
import { Link } from "@inertiajs/vue3";
|
|
|
|
const props = defineProps({
|
|
href: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
active: {
|
|
type: Boolean,
|
|
},
|
|
});
|
|
|
|
const classes = computed(() =>
|
|
props.active
|
|
? "flex items-center p-3 mb-1 bg-sky-600 rounded font-medium leading-5 text-slate-900 dark:text-gray-100 transition duration-150 ease-in-out hover:ring-sky-500"
|
|
: "flex items-center p-3 mb-1 rounded font-medium leading-5 text-gray-500 border border-zinc-900 dark:text-gray-400 hover:text-gray-700 dark:hover:text-zinc-100 hover:border-sky-500 hover:ring-sky-500 dark:hover:border-sky-600 hover:ring-sky-500 dark:hover:ring-sky-600 transition duration-150 ease-in-out"
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<Link :href="href" :class="classes">
|
|
<slot />
|
|
</Link>
|
|
</template>
|