chore(prettier): use svelteStrictMode

This commit is contained in:
Eric Liu 2020-09-04 16:35:49 -07:00
commit 42b8159b1c
182 changed files with 2020 additions and 1912 deletions

View file

@ -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}