mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
feat(prettier): add svelteBracketNewLine
This commit is contained in:
parent
7a28d21ceb
commit
398887a3d3
182 changed files with 974 additions and 494 deletions
|
@ -13,32 +13,38 @@
|
|||
{...$$props.menu}
|
||||
on:close="{({ detail }) => {
|
||||
console.log('close', detail);
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
href="https://ibm.com"
|
||||
text="Option 1"
|
||||
bind:primaryFocus />
|
||||
bind:primaryFocus
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
href="https://ibm.com"
|
||||
text="Option 2 is an example of a really long string and how we
|
||||
recommend handling this"
|
||||
requireTitle />
|
||||
requireTitle
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
href="https://ibm.com"
|
||||
text="Option 3"
|
||||
disabled />
|
||||
disabled
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
href="https://ibm.com"
|
||||
text="Option 4" />
|
||||
text="Option 4"
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
href="https://ibm.com"
|
||||
text="Danger option"
|
||||
danger />
|
||||
danger
|
||||
/>
|
||||
</OverflowMenu>
|
||||
{:else if story === 'trigger'}
|
||||
<OverflowMenu
|
||||
|
@ -46,17 +52,20 @@
|
|||
on:close="{({ detail }) => {
|
||||
console.log('close', detail);
|
||||
}}"
|
||||
style="width: auto">
|
||||
style="width: auto"
|
||||
>
|
||||
<div slot="menu" style="padding: 0 1rem">Menu</div>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
text="Option 1"
|
||||
bind:primaryFocus />
|
||||
bind:primaryFocus
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
text="Option 2 is an example of a really long string and how we
|
||||
recommend handling this"
|
||||
requireTitle />
|
||||
requireTitle
|
||||
/>
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Option 3" disabled />
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Option 4" />
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Danger option" danger />
|
||||
|
@ -66,16 +75,19 @@
|
|||
{...$$props.menu}
|
||||
on:close="{({ detail }) => {
|
||||
console.log('close', detail);
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
text="Option 1"
|
||||
bind:primaryFocus />
|
||||
bind:primaryFocus
|
||||
/>
|
||||
<OverflowMenuItem
|
||||
{...$$props.menuItem}
|
||||
text="Option 2 is an example of a really long string and how we
|
||||
recommend handling this"
|
||||
requireTitle />
|
||||
requireTitle
|
||||
/>
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Option 3" disabled />
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Option 4" />
|
||||
<OverflowMenuItem {...$$props.menuItem} text="Danger option" danger />
|
||||
|
|
|
@ -188,13 +188,15 @@
|
|||
buttonRef.focus();
|
||||
}
|
||||
}
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<slot name="menu">
|
||||
<svelte:component
|
||||
this="{icon}"
|
||||
aria-label="{iconDescription}"
|
||||
title="{iconDescription}"
|
||||
class="bx--overflow-menu__icon {iconClass}" />
|
||||
class="bx--overflow-menu__icon {iconClass}"
|
||||
/>
|
||||
</slot>
|
||||
{#if open}
|
||||
<ul
|
||||
|
@ -207,7 +209,8 @@
|
|||
class:bx--overflow-menu--flip="{flipped}"
|
||||
class:bx--overflow-menu-options--open="{open}"
|
||||
class:bx--overflow-menu-options--light="{light}"
|
||||
class:menuOptionsClass>
|
||||
class:menuOptionsClass
|
||||
>
|
||||
<slot />
|
||||
</ul>
|
||||
{/if}
|
||||
|
|
|
@ -83,7 +83,8 @@
|
|||
class:bx--overflow-menu--divider="{hasDivider}"
|
||||
class:bx--overflow-menu-options__option--danger="{danger}"
|
||||
class:bx--overflow-menu-options__option--disabled="{disabled}"
|
||||
{...$$restProps}>
|
||||
{...$$restProps}
|
||||
>
|
||||
{#if href}
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<a
|
||||
|
@ -100,7 +101,8 @@
|
|||
} else if (key === 'ArrowUp') {
|
||||
change(-1);
|
||||
}
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<slot>
|
||||
<div class:bx--overflow-menu-options__option-content="{true}">
|
||||
{text}
|
||||
|
@ -122,7 +124,8 @@
|
|||
} else if (key === 'ArrowUp') {
|
||||
change(-1);
|
||||
}
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<slot>
|
||||
<div class:bx--overflow-menu-options__option-content="{true}">
|
||||
{text}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue