carbon-components-svelte
Version:
Svelte implementation of the Carbon Design System
18 lines (15 loc) • 546 B
TypeScript
export type CopyFeedbackAnimation = "fade-in" | "fade-out" | undefined;
export type CopyFeedbackState = {
readonly animation: CopyFeedbackAnimation;
readonly feedbackOpen: boolean;
readonly copyPending: boolean;
dismiss: () => void;
onClick: (
performCopy: () => void | Promise<void>,
feedbackTimeout: number,
portalled?: boolean,
) => Promise<void>;
onAnimationEnd: (event: { animationName: string }) => void;
cleanup: () => void;
};
export function createCopyFeedbackState(onSync?: () => void): CopyFeedbackState;