19 lines
595 B
Vue
19 lines
595 B
Vue
<script setup lang="ts">
|
|
defineProps<{ items: { label: string; to?: string }[] }>();
|
|
</script>
|
|
|
|
<template>
|
|
<nav aria-label="breadcrumb" class="max-w-mall text-muted mx-auto my-5 px-4 text-[13px]">
|
|
<template v-for="(item, i) in items" :key="i">
|
|
<NuxtLink
|
|
v-if="item.to"
|
|
:to="item.to"
|
|
class="hover:text-primary no-underline transition-colors"
|
|
>{{ item.label }}</NuxtLink
|
|
>
|
|
<span v-else class="text-text">{{ item.label }}</span>
|
|
<span v-if="i < items.length - 1" class="text-muted/60 mx-2">/</span>
|
|
</template>
|
|
</nav>
|
|
</template>
|