feat(breadcrumb): supporot noTrailingSlash in skeleton

This commit is contained in:
Eric Liu 2020-07-24 22:27:05 -07:00
commit 51034f24a3
3 changed files with 23 additions and 4 deletions

View file

@ -1,12 +1,27 @@
<script>
/**
* Set to `true` to hide breadcrumb trailing slash
* @type {boolean} [noTrailingSlash=false]
*/
export let noTrailingSlash = false;
/**
* Set number of breadcrumb items to render
* @type {number} [count=3]
*/
export let count = 3;
</script>
<div
class:bx--breadcrumb={true}
class:bx--breadcrumb--no-trailing-slash={noTrailingSlash}
class:bx--skeleton={true}
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave>
{#each [0, 1, 2] as item, i (item)}
{#each Array.from({ length: count }, (_, i) => i) as item, i (item)}
<div class:bx--breadcrumb-item={true}>
<span class:bx--link={true}>&nbsp;</span>
</div>