docs(breadcrumb): update

This commit is contained in:
Benjamin Canac
2024-07-17 11:54:39 +02:00
parent 59a84f2ace
commit 8563ea157b
5 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<script setup lang="ts">
const items = [{
label: 'Home',
to: '/'
}, {
slot: 'dropdown' as const,
icon: 'i-heroicons-ellipsis-horizontal',
children: [{
label: 'Documentation'
}, {
label: 'Themes'
}, {
label: 'GitHub'
}]
}, {
label: 'Components',
to: '/components'
}, {
label: 'Breadcrumb',
to: '/components/breadcrumb'
}]
</script>
<template>
<UBreadcrumb :items="items">
<template #dropdown="{ item }">
<UDropdownMenu :items="item.children">
<UButton :icon="item.icon" color="gray" variant="link" class="p-0.5" />
</UDropdownMenu>
</template>
</UBreadcrumb>
</template>

View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
const items = [{
label: 'Home',
icon: 'i-heroicons-home'
}, {
icon: 'i-heroicons-cube-transparent',
label: 'Components',
to: '/components'
}, {
icon: 'i-heroicons-link',
label: 'Breadcrumb',
to: '/components/breadcrumb'
}]
</script>
<template>
<UBreadcrumb :items="items" />
</template>

View File

@@ -0,0 +1,16 @@
<script setup lang="ts">
const items = [{
label: 'Home',
to: '/'
}, {
label: 'Components',
to: '/components'
}, {
label: 'Breadcrumb',
to: '/components/breadcrumb'
}]
</script>
<template>
<UBreadcrumb :items="items" separator-icon="i-mdi-slash-forward" />
</template>

View File

@@ -0,0 +1,20 @@
<script setup lang="ts">
const items = [{
label: 'Home',
to: '/'
}, {
label: 'Components',
to: '/components'
}, {
label: 'Breadcrumb',
to: '/components/breadcrumb'
}]
</script>
<template>
<UBreadcrumb :items="items">
<template #separator>
<span class="mx-2 text-gray-500 dark:text-gray-400">/</span>
</template>
</UBreadcrumb>
</template>