mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
feat(uishell): make component based
This commit is contained in:
parent
ab6634a692
commit
e24de4e797
24 changed files with 172 additions and 1261 deletions
|
@ -1,41 +0,0 @@
|
|||
<script>
|
||||
export let href = undefined;
|
||||
export let text = undefined;
|
||||
export let subMenu = undefined;
|
||||
|
||||
import { cx } from '../../../lib';
|
||||
import UIShellSubmenu from './UIShellNavSubmenu.svelte';
|
||||
</script>
|
||||
|
||||
{#if href}
|
||||
<li>
|
||||
<a
|
||||
class={cx('--header__menu-item')}
|
||||
role="menuitem"
|
||||
tabindex="0"
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keyup
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur
|
||||
{href}>
|
||||
<span class={cx('--text-truncate--end')}>{text}</span>
|
||||
</a>
|
||||
</li>
|
||||
{:else}
|
||||
<UIShellSubmenu
|
||||
{href}
|
||||
{text}
|
||||
{subMenu}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keyup
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue