mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
feat: support skeleton prop
This commit is contained in:
parent
e2c8ea6d76
commit
bd6bd15c79
5 changed files with 136 additions and 88 deletions
|
@ -1,17 +1,29 @@
|
|||
<script>
|
||||
export let noTrailingSlash = false;
|
||||
export let skeleton = false;
|
||||
|
||||
import BreadcrumbSkeleton from "./Breadcrumb.Skeleton.svelte";
|
||||
</script>
|
||||
|
||||
<nav
|
||||
aria-label="Breadcrumb"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
<ol
|
||||
class:bx--breadcrumb={true}
|
||||
class:bx--breadcrumb--no-trailing-slash={noTrailingSlash}>
|
||||
<slot />
|
||||
</ol>
|
||||
</nav>
|
||||
{#if skeleton}
|
||||
<BreadcrumbSkeleton
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave />
|
||||
{:else}
|
||||
<nav
|
||||
aria-label="Breadcrumb"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
<ol
|
||||
class:bx--breadcrumb={true}
|
||||
class:bx--breadcrumb--no-trailing-slash={noTrailingSlash}>
|
||||
<slot />
|
||||
</ol>
|
||||
</nav>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue