mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21: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
|
@ -50,26 +50,26 @@
|
|||
</style>
|
||||
|
||||
<svelte:body
|
||||
on:click={({ target }) => {
|
||||
on:click="{({ target }) => {
|
||||
if (isOpen && !ref.contains(target) && !refPanel.contains(target)) {
|
||||
isOpen = false;
|
||||
dispatch('close');
|
||||
}
|
||||
}} />
|
||||
}}" />
|
||||
|
||||
<div>
|
||||
<button
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
type="button"
|
||||
class:bx--header__action={true}
|
||||
class:bx--header__action--active={isOpen}
|
||||
class:action-text={text}
|
||||
class:bx--header__action="{true}"
|
||||
class:bx--header__action--active="{isOpen}"
|
||||
class:action-text="{text}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:click|stopPropagation={() => {
|
||||
on:click|stopPropagation="{() => {
|
||||
isOpen = !isOpen;
|
||||
dispatch(isOpen ? 'open' : 'close');
|
||||
}}>
|
||||
}}">
|
||||
<Icon {...icon} />
|
||||
<slot name="text">
|
||||
{#if text}<span>{text}</span>{/if}
|
||||
|
@ -77,10 +77,10 @@
|
|||
</button>
|
||||
{#if isOpen}
|
||||
<div
|
||||
bind:this={refPanel}
|
||||
class:bx--header-panel={true}
|
||||
class:bx--header-panel--expanded={true}
|
||||
transition:slide={{ duration: 200 }}>
|
||||
bind:this="{refPanel}"
|
||||
class:bx--header-panel="{true}"
|
||||
class:bx--header-panel--expanded="{true}"
|
||||
transition:slide="{{ duration: 200 }}">
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue