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
|
@ -43,39 +43,39 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-live="polite"
|
||||
class:bx--copy-btn="{true}"
|
||||
class:bx--copy="{true}"
|
||||
class:bx--copy-btn--animating="{animation}"
|
||||
class:bx--copy-btn--fade-in="{animation === 'fade-in'}"
|
||||
class:bx--copy-btn--fade-out="{animation === 'fade-out'}"
|
||||
aria-label="{iconDescription}"
|
||||
title="{iconDescription}"
|
||||
class:bx--copy-btn={true}
|
||||
class:bx--copy={true}
|
||||
class:bx--copy-btn--animating={animation}
|
||||
class:bx--copy-btn--fade-in={animation === "fade-in"}
|
||||
class:bx--copy-btn--fade-out={animation === "fade-out"}
|
||||
aria-label={iconDescription}
|
||||
title={iconDescription}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:click="{() => {
|
||||
on:click={() => {
|
||||
if (text !== undefined) {
|
||||
copy(text);
|
||||
dispatch('copy');
|
||||
dispatch("copy");
|
||||
}
|
||||
|
||||
if (animation === 'fade-in') return;
|
||||
animation = 'fade-in';
|
||||
if (animation === "fade-in") return;
|
||||
animation = "fade-in";
|
||||
timeout = setTimeout(() => {
|
||||
animation = 'fade-out';
|
||||
animation = "fade-out";
|
||||
}, feedbackTimeout);
|
||||
}}"
|
||||
}}
|
||||
on:animationend
|
||||
on:animationend="{({ animationName }) => {
|
||||
if (animationName === 'hide-feedback') {
|
||||
on:animationend={({ animationName }) => {
|
||||
if (animationName === "hide-feedback") {
|
||||
animation = undefined;
|
||||
}
|
||||
}}"
|
||||
}}
|
||||
>
|
||||
<Copy class="bx--snippet__icon" />
|
||||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue