mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
breaking(ui-shell): remove GlobalHeader, SideNav folders (#1223)
* breaking(ui-shell): remove GlobalHeader/SideNav folders * Run "yarn build:docs"
This commit is contained in:
parent
d34f571150
commit
62735d6275
34 changed files with 56 additions and 56 deletions
32
src/UIShell/SideNavMenuItem.svelte
Normal file
32
src/UIShell/SideNavMenuItem.svelte
Normal file
|
@ -0,0 +1,32 @@
|
|||
<script>
|
||||
/** Set to `true` to select the item */
|
||||
export let isSelected = false;
|
||||
|
||||
/**
|
||||
* Specify the `href` attribute
|
||||
* @type {string}
|
||||
*/
|
||||
export let href = undefined;
|
||||
|
||||
/**
|
||||
* Specify the item text
|
||||
* @type {string}
|
||||
*/
|
||||
export let text = undefined;
|
||||
|
||||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
</script>
|
||||
|
||||
<li class:bx--side-nav__menu-item="{true}">
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
aria-current="{isSelected ? 'page' : undefined}"
|
||||
href="{href}"
|
||||
class:bx--side-nav__link="{true}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
>
|
||||
<span class:bx--side-nav__link-text="{true}"><slot>{text}</slot></span>
|
||||
</a>
|
||||
</li>
|
Loading…
Add table
Add a link
Reference in a new issue