forked from tsai/budibase
7 changed files with 38 additions and 40 deletions
@ -1,3 +1,15 @@ |
|||||
<li class="spectrum-Menu-item" role="menuitem" tabindex="0"> |
<script> |
||||
<span class="spectrum-Menu-itemLabel"><slot /></span> |
export let icon = undefined; |
||||
|
export let disabled = undefined; |
||||
|
</script> |
||||
|
|
||||
|
<li on:click class="spectrum-Menu-item" class:is-disabled={disabled} role="menuitem" tabindex="0"> |
||||
|
<span class="spectrum-Menu-itemLabel"> |
||||
|
{#if icon} |
||||
|
<svg class="spectrum-Icon spectrum-Icon--sizeM spectrum-Menu-itemIcon" focusable="false" aria-hidden="true" aria-label={icon}> |
||||
|
<use xlink:href="#spectrum-icon-18-{icon}"></use> |
||||
|
</svg> |
||||
|
{/if} |
||||
|
<span class="spectrum-Menu-itemLabel"><slot /></span> |
||||
|
</span> |
||||
</li> |
</li> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<script> |
||||
|
import Menu from './Menu.svelte' |
||||
|
import Separator from './Separator.svelte' |
||||
|
import Section from './Section.svelte' |
||||
|
import Item from './Item.svelte' |
||||
|
</script> |
||||
|
|
||||
|
<Menu> |
||||
|
<Section heading="Section heading"> |
||||
|
<Item>Some Item 1</Item> |
||||
|
<Item>Some Item 2</Item> |
||||
|
<Item>Some Item 3</Item> |
||||
|
</Section> |
||||
|
<Separator /> |
||||
|
<Section heading="Section heading"> |
||||
|
<Item icon="SaveFloppy">Save</Item> |
||||
|
<Item disabled icon="DataDownload">Download</Item> |
||||
|
</Section> |
||||
|
</Menu> |
||||
@ -0,0 +1 @@ |
|||||
|
<li class="spectrum-Menu-divider" role="separator"></li> |
||||
Loading…
Reference in new issue