mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
24 lines
553 B
Svelte
24 lines
553 B
Svelte
<script>
|
|
export let href = undefined;
|
|
export let isCurrentPage = false;
|
|
|
|
import { Link } from "../Link";
|
|
</script>
|
|
|
|
<li
|
|
class:bx--breadcrumb-item={true}
|
|
class:bx--breadcrumb-item--current={isCurrentPage && $$restProps['aria-current'] !== 'page'}
|
|
{...$$restProps}
|
|
on:click
|
|
on:mouseover
|
|
on:mouseenter
|
|
on:mouseleave>
|
|
{#if href}
|
|
<Link {href} aria-current={$$restProps['aria-current']}>
|
|
<slot />
|
|
</Link>
|
|
{:else}
|
|
<slot
|
|
props={{ 'aria-current': $$restProps['aria-current'], class: 'bx--link' }} />
|
|
{/if}
|
|
</li>
|