27 lines
955 B
Vue
27 lines
955 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
|
|
? 'block w-full ps-3 pe-4 py-2 border-l-4 border-primary text-start text-base font-subtitle font-bold text-primary bg-primary/5 focus:outline-none focus:text-primary focus:bg-primary/10 focus:border-primary transition duration-150 ease-in-out'
|
|
: 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-subtitle font-medium text-anthracite/60 hover:text-primary hover:bg-sand/30 hover:border-anthracite/20 focus:outline-none focus:text-primary focus:bg-sand/30 focus:border-anthracite/20 transition duration-150 ease-in-out',
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<Link :href="href" :class="classes">
|
|
<slot />
|
|
</Link>
|
|
</template>
|