mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -34,31 +34,31 @@
|
|||
</script>
|
||||
|
||||
<svelte:body
|
||||
on:keydown={({ key }) => {
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === 'Escape') {
|
||||
hidden = true;
|
||||
}
|
||||
}} />
|
||||
}}" />
|
||||
|
||||
<div
|
||||
class:bx--tooltip--definition={true}
|
||||
class:bx--tooltip--a11y={true}
|
||||
class:bx--tooltip--definition="{true}"
|
||||
class:bx--tooltip--a11y="{true}"
|
||||
{...$$restProps}
|
||||
on:mouseenter={() => {
|
||||
on:mouseenter="{() => {
|
||||
hidden = false;
|
||||
visible = true;
|
||||
}}
|
||||
on:mouseleave={() => {
|
||||
}}"
|
||||
on:mouseleave="{() => {
|
||||
visible = false;
|
||||
}}>
|
||||
}}">
|
||||
<button
|
||||
bind:this={ref}
|
||||
aria-describedby={id}
|
||||
class:bx--tooltip--a11y={true}
|
||||
class:bx--tooltip__trigger={true}
|
||||
class:bx--tooltip__trigger--definition={true}
|
||||
class:bx--tooltip--hidden={hidden}
|
||||
class:bx--tooltip--visible={visible}
|
||||
bind:this="{ref}"
|
||||
aria-describedby="{id}"
|
||||
class:bx--tooltip--a11y="{true}"
|
||||
class:bx--tooltip__trigger="{true}"
|
||||
class:bx--tooltip__trigger--definition="{true}"
|
||||
class:bx--tooltip--hidden="{hidden}"
|
||||
class:bx--tooltip--visible="{visible}"
|
||||
class="{direction && `bx--tooltip--${direction}`}
|
||||
{align && `bx--tooltip--align-${align}`}"
|
||||
on:click
|
||||
|
@ -66,10 +66,12 @@
|
|||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:focus
|
||||
on:focus={() => {
|
||||
on:focus="{() => {
|
||||
hidden = false;
|
||||
}}>
|
||||
}}">
|
||||
<slot />
|
||||
</button>
|
||||
<div role="tooltip" {id} class:bx--assistive-text={true}>{tooltipText}</div>
|
||||
<div role="tooltip" id="{id}" class:bx--assistive-text="{true}">
|
||||
{tooltipText}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue