|
| 1 | +<template> |
| 2 | + <div class="docs-body container-lg mx-auto"> |
| 3 | + <h2>Overview</h2> |
| 4 | + <DemoBlock class="mt-3"> |
| 5 | + <BsBreadcrumb :items="items1" /> |
| 6 | + <BsBreadcrumb :items="items2" /> |
| 7 | + </DemoBlock> |
| 8 | + <h2 class="mt-5">Icons</h2> |
| 9 | + <DemoBlock class="mt-3"> |
| 10 | + <BsBreadcrumb :items="items1" prepend-icon="home" /> |
| 11 | + <BsBreadcrumb :items="items2" prepend-icon="home" icon-size="28"/> |
| 12 | + <div class="h5 mt-4">Using Custom Slot</div> |
| 13 | + <BsBreadcrumb :items="items2"> |
| 14 | + <template #icon> |
| 15 | + <BsFontAwesome icon="house-user" variant="regular" /> |
| 16 | + </template> |
| 17 | + </BsBreadcrumb> |
| 18 | + </DemoBlock> |
| 19 | + <h2 class="mt-5">Separators</h2> |
| 20 | + <DemoBlock class="mt-3"> |
| 21 | + <BsBreadcrumb :items="items1" icon-size="22" prepend-icon="home" separator=">" /> |
| 22 | + <div class="h5 mt-4">Using Embedded SVG</div> |
| 23 | + <BsBreadcrumb :items="items2" icon-size="22" prepend-icon="home" :separator="svg"/> |
| 24 | + </DemoBlock> |
| 25 | + </div> |
| 26 | +</template> |
| 27 | + |
| 28 | +<script setup lang="ts"> |
| 29 | +const svg = encodeURI('url("data:image/svg+xml, <svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 -60 320 512\' fill=\'#3b7cf5\' width=\'14\' height=\'16\'><path d=\'M273 239c9.4 9.4 9.4 24.6 0 33.9L113 433c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l143-143L79 113c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L273 239z\' /></svg>")'); |
| 30 | +const items1 = [ |
| 31 | + { label: 'Home', href: '#' }, |
| 32 | + { label: 'Components', href: '#' }, |
| 33 | +]; |
| 34 | +const items2 = [ |
| 35 | + { label: 'Home', href: '#' }, |
| 36 | + { label: 'Components', path: '/components/breadcrumb' }, |
| 37 | + { label: 'Breadcrumb', href: '#' }, |
| 38 | +]; |
| 39 | +</script> |
0 commit comments