mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: lift components folder
This commit is contained in:
parent
76df51674d
commit
2200b29b92
301 changed files with 57 additions and 76 deletions
24
src/Breadcrumb/BreadcrumbItem.svelte
Normal file
24
src/Breadcrumb/BreadcrumbItem.svelte
Normal file
|
@ -0,0 +1,24 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue