mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -182,50 +182,50 @@
|
|||
</script>
|
||||
|
||||
<svelte:body
|
||||
on:click={({ target }) => {
|
||||
on:click="{({ target }) => {
|
||||
if (!programmatic && open && refTooltip && !refTooltip.contains(target)) {
|
||||
open = false;
|
||||
}
|
||||
}} />
|
||||
}}" />
|
||||
|
||||
<div {...$$restProps} style="{$$restProps.style}; position: relative;">
|
||||
{#if !hideIcon}
|
||||
<div bind:this={ref} id={triggerId} class:bx--tooltip__label={true}>
|
||||
<div bind:this="{ref}" id="{triggerId}" class:bx--tooltip__label="{true}">
|
||||
<slot name="triggerText">{triggerText}</slot>
|
||||
<div
|
||||
bind:this={refIcon}
|
||||
bind:this="{refIcon}"
|
||||
{...buttonProps}
|
||||
on:click|preventDefault|stopPropagation={openMenu}
|
||||
on:focus={openMenu}
|
||||
on:blur={onBlur}
|
||||
on:keydown={onKeydown}>
|
||||
on:click|preventDefault|stopPropagation="{openMenu}"
|
||||
on:focus="{openMenu}"
|
||||
on:blur="{onBlur}"
|
||||
on:keydown="{onKeydown}">
|
||||
<slot name="icon">
|
||||
<svelte:component this={icon} name={iconName} />
|
||||
<svelte:component this="{icon}" name="{iconName}" />
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
{...buttonProps}
|
||||
on:click|preventDefault|stopPropagation={openMenu}
|
||||
on:focus={openMenu}
|
||||
on:blur={onBlur}
|
||||
on:keydown={onKeydown}>
|
||||
on:click|preventDefault|stopPropagation="{openMenu}"
|
||||
on:focus="{openMenu}"
|
||||
on:blur="{onBlur}"
|
||||
on:keydown="{onKeydown}">
|
||||
<slot name="triggerText">{triggerText}</slot>
|
||||
</div>
|
||||
{/if}
|
||||
{#if open}
|
||||
<div
|
||||
bind:this={refTooltip}
|
||||
bind:this="{refTooltip}"
|
||||
role="tooltip"
|
||||
tabindex="0"
|
||||
id={tooltipId}
|
||||
data-floating-menu-direction={direction}
|
||||
class:bx--tooltip={true}
|
||||
class:bx--tooltip--shown={open}
|
||||
on:blur={closeMenu}>
|
||||
<span class:bx--tooltip__caret={true} />
|
||||
id="{tooltipId}"
|
||||
data-floating-menu-direction="{direction}"
|
||||
class:bx--tooltip="{true}"
|
||||
class:bx--tooltip--shown="{open}"
|
||||
on:blur="{closeMenu}">
|
||||
<span class:bx--tooltip__caret="{true}"></span>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue