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
|
@ -30,35 +30,35 @@
|
|||
</script>
|
||||
|
||||
<button
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
type="button"
|
||||
aria-live="polite"
|
||||
class:bx--copy={true}
|
||||
class:bx--copy-btn--animating={animation}
|
||||
aria-label={animation ? feedback : undefined}
|
||||
class:bx--copy="{true}"
|
||||
class:bx--copy-btn--animating="{animation}"
|
||||
aria-label="{animation ? feedback : undefined}"
|
||||
{...$$restProps}
|
||||
class="{$$restProps.class} {animation && `bx--copy-btn--${animation}`}"
|
||||
on:click
|
||||
on:click={() => {
|
||||
on:click="{() => {
|
||||
if (animation === 'fade-in') return;
|
||||
animation = 'fade-in';
|
||||
timeout = setTimeout(() => {
|
||||
animation = 'fade-out';
|
||||
}, feedbackTimeout);
|
||||
}}
|
||||
}}"
|
||||
on:animationend
|
||||
on:animationend={({ animationName }) => {
|
||||
on:animationend="{({ animationName }) => {
|
||||
if (animationName === 'hide-feedback') {
|
||||
animation = undefined;
|
||||
}
|
||||
}}>
|
||||
}}">
|
||||
<slot>
|
||||
{#if animation}{feedback || $$restProps['aria-label']}{/if}
|
||||
</slot>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class:bx--assistive-text={true}
|
||||
class:bx--copy-btn__feedback={true}>
|
||||
class:bx--assistive-text="{true}"
|
||||
class:bx--copy-btn__feedback="{true}">
|
||||
{feedback}
|
||||
</span>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue