2024-08-23 14:42:32 +02:00
|
|
|
<template>
|
2024-11-16 12:19:13 +01:00
|
|
|
<RouterLink v-if="link" :to="link">
|
2024-09-01 19:19:48 +02:00
|
|
|
<p
|
|
|
|
class="cursor-pointer w-full px-2 py-3"
|
2024-11-16 12:19:13 +01:00
|
|
|
:class="active ? 'rounded-r-lg bg-red-200 border-l-4 border-l-primary' : 'pl-3 hover:bg-red-200 rounded-lg'"
|
2024-09-01 19:19:48 +02:00
|
|
|
>
|
2024-11-16 12:19:13 +01:00
|
|
|
{{ title }}
|
2024-09-01 19:19:48 +02:00
|
|
|
</p>
|
|
|
|
</RouterLink>
|
2024-08-23 14:42:32 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-11-16 12:19:13 +01:00
|
|
|
import { defineComponent, type PropType } from "vue";
|
|
|
|
import { RouterLink } from "vue-router";
|
2024-08-23 14:42:32 +02:00
|
|
|
import { mapState, mapActions } from "pinia";
|
|
|
|
import { useNavigationStore, type navigationLinkModel } from "@/stores/admin/navigation";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
2024-11-16 12:19:13 +01:00
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: "LINK",
|
|
|
|
},
|
2024-08-23 14:42:32 +02:00
|
|
|
link: {
|
2024-11-27 17:06:39 +01:00
|
|
|
type: Object as PropType<string | { name: string }>,
|
2024-11-16 12:19:13 +01:00
|
|
|
default: "/",
|
|
|
|
},
|
|
|
|
active: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
2024-08-23 14:42:32 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|