mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: format files with Prettier 3
This commit is contained in:
parent
1dcd09bd98
commit
8e996dc683
391 changed files with 3725 additions and 3785 deletions
|
@ -36,47 +36,47 @@
|
|||
</script>
|
||||
|
||||
<svelte:window
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === 'Escape') {
|
||||
on:keydown={({ key }) => {
|
||||
if (key === "Escape") {
|
||||
hidden = true;
|
||||
}
|
||||
}}"
|
||||
}}
|
||||
/>
|
||||
|
||||
<button
|
||||
bind:this="{ref}"
|
||||
disabled="{disabled}"
|
||||
aria-describedby="{id}"
|
||||
class:bx--tooltip__trigger="{true}"
|
||||
class:bx--tooltip--a11y="{true}"
|
||||
class:bx--tooltip--hidden="{hidden || disabled}"
|
||||
class:bx--tooltip--top="{direction === 'top'}"
|
||||
class:bx--tooltip--right="{direction === 'right'}"
|
||||
class:bx--tooltip--bottom="{direction === 'bottom'}"
|
||||
class:bx--tooltip--left="{direction === 'left'}"
|
||||
class:bx--tooltip--align-start="{align === 'start'}"
|
||||
class:bx--tooltip--align-center="{align === 'center'}"
|
||||
class:bx--tooltip--align-end="{align === 'end'}"
|
||||
style:cursor="{disabled ? "not-allowed" : "default"}"
|
||||
bind:this={ref}
|
||||
{disabled}
|
||||
aria-describedby={id}
|
||||
class:bx--tooltip__trigger={true}
|
||||
class:bx--tooltip--a11y={true}
|
||||
class:bx--tooltip--hidden={hidden || disabled}
|
||||
class:bx--tooltip--top={direction === "top"}
|
||||
class:bx--tooltip--right={direction === "right"}
|
||||
class:bx--tooltip--bottom={direction === "bottom"}
|
||||
class:bx--tooltip--left={direction === "left"}
|
||||
class:bx--tooltip--align-start={align === "start"}
|
||||
class:bx--tooltip--align-center={align === "center"}
|
||||
class:bx--tooltip--align-end={align === "end"}
|
||||
style:cursor={disabled ? "not-allowed" : "default"}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseenter="{() => {
|
||||
on:mouseenter={() => {
|
||||
if (disabled) return;
|
||||
hidden = false;
|
||||
}}"
|
||||
}}
|
||||
on:mouseleave
|
||||
on:focus
|
||||
on:focus="{() => {
|
||||
on:focus={() => {
|
||||
if (disabled) return;
|
||||
hidden = false;
|
||||
}}"
|
||||
}}
|
||||
>
|
||||
<span id="{id}" class:bx--assistive-text="{true}">
|
||||
<span {id} class:bx--assistive-text={true}>
|
||||
<slot name="tooltipText">{tooltipText}</slot>
|
||||
</span>
|
||||
<slot>
|
||||
<svelte:component this="{icon}" />
|
||||
<svelte:component this={icon} />
|
||||
</slot>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue