mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +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
18
src/components/UIShell/SideNav/SideNavMenuItem.svelte
Normal file
18
src/components/UIShell/SideNav/SideNavMenuItem.svelte
Normal file
|
@ -0,0 +1,18 @@
|
|||
<script>
|
||||
export let href = undefined;
|
||||
export let text = undefined;
|
||||
export let isSelected = undefined;
|
||||
|
||||
import { cx } from '../../../lib';
|
||||
</script>
|
||||
|
||||
<li class={cx('--side-nav__menu-item')} role="none">
|
||||
<a
|
||||
{href}
|
||||
class={cx('--side-nav__link')}
|
||||
role="menuitem"
|
||||
aria-current={isSelected ? 'page' : ''}
|
||||
on:click>
|
||||
<span class={cx('--side-nav__link-text')}>{text}</span>
|
||||
</a>
|
||||
</li>
|
Loading…
Add table
Add a link
Reference in a new issue