feat: finalisation de la Sidebar.vue
This commit is contained in:
parent
d9e935f7de
commit
53365df456
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<li>
|
||||
<RouterLink v-if="to" :to="to" class="block hover:text-green-600" role="menuitem">
|
||||
{{ text }}
|
||||
</RouterLink>
|
||||
<button v-else @click="$emit('click')" class="w-full text-left hover:text-green-600" role="menuitem">
|
||||
{{ text }}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
text: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
});
|
||||
|
||||
defineEmits(['click']);
|
||||
</script>
|
||||
|
||||
<style lang="postcss" scoped>
|
||||
.router-link-exact-active {
|
||||
@apply text-green-600;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user