mobilizon/js/src/components/Settings/SettingMenuSection.vue
Thomas Citharel 48935e2168
Add global search
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-08-28 10:02:06 +02:00

39 lines
848 B
Vue

<template>
<li
class="bg-mbz-yellow-alt-300 text-violet-2 dark:bg-mbz-purple-500 dark:text-zinc-100 text-xl"
>
<router-link
class="cursor-pointer my-2 mx-0 py-2 px-3 font-medium block no-underline"
v-if="to"
:to="to"
>{{ title }}</router-link
>
<b v-else>{{ title }}</b>
<ul>
<slot></slot>
</ul>
</li>
</template>
<script lang="ts" setup>
defineProps<{
title?: string;
to: { name: string; params?: Record<string, any> };
}>();
// const route = useRoute();
// const slots = useSlots();
// const sectionActive = computed((): boolean => {
// if (slots.default) {
// return slots.default.some(
// ({
// componentOptions: {
// propsData: { to },
// },
// }) => to && to.name === route.name
// );
// }
// return false;
// });
</script>