Capital/components/docs/TableOfContentLink.vue

15 lines
405 B
Vue
Raw Normal View History

2024-09-27 16:28:40 +00:00
<template>
<v-list-item :active="route.hash.replace('#', '') == link.id" :to="{ hash: '#'+link.id }">
<template #prepend>
<v-icon icon="mdi-menu-right" :style="`padding-left: ${props.padding ?? 0}rem`" />
</template>
{{ link.text }}
</v-list-item>
</template>
<script setup lang="ts">
const props = defineProps<{ link: any, padding?: number }>()
const route = useRoute()
</script>