mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -78,51 +78,55 @@
|
|||
|
||||
<li
|
||||
role="menuitem"
|
||||
{id}
|
||||
class:bx--overflow-menu-options__option={true}
|
||||
class:bx--overflow-menu--divider={hasDivider}
|
||||
class:bx--overflow-menu-options__option--danger={danger}
|
||||
class:bx--overflow-menu-options__option--disabled={disabled}
|
||||
id="{id}"
|
||||
class:bx--overflow-menu-options__option="{true}"
|
||||
class:bx--overflow-menu--divider="{hasDivider}"
|
||||
class:bx--overflow-menu-options__option--danger="{danger}"
|
||||
class:bx--overflow-menu-options__option--disabled="{disabled}"
|
||||
{...$$restProps}>
|
||||
{#if href}
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<a
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
{...buttonProps}
|
||||
on:click
|
||||
on:click={() => {
|
||||
on:click="{() => {
|
||||
update(id);
|
||||
}}
|
||||
}}"
|
||||
on:keydown
|
||||
on:keydown={({ key }) => {
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === 'ArrowDown') {
|
||||
change(1);
|
||||
} else if (key === 'ArrowUp') {
|
||||
change(-1);
|
||||
}
|
||||
}}>
|
||||
}}">
|
||||
<slot>
|
||||
<div class:bx--overflow-menu-options__option-content={true}>{text}</div>
|
||||
<div class:bx--overflow-menu-options__option-content="{true}">
|
||||
{text}
|
||||
</div>
|
||||
</slot>
|
||||
</a>
|
||||
{:else}
|
||||
<button
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
{...buttonProps}
|
||||
on:click
|
||||
on:click={() => {
|
||||
on:click="{() => {
|
||||
update(id);
|
||||
}}
|
||||
}}"
|
||||
on:keydown
|
||||
on:keydown={({ key }) => {
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === 'ArrowDown') {
|
||||
change(1);
|
||||
} else if (key === 'ArrowUp') {
|
||||
change(-1);
|
||||
}
|
||||
}}>
|
||||
}}">
|
||||
<slot>
|
||||
<div class:bx--overflow-menu-options__option-content={true}>{text}</div>
|
||||
<div class:bx--overflow-menu-options__option-content="{true}">
|
||||
{text}
|
||||
</div>
|
||||
</slot>
|
||||
</button>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue