UNPKG

@rxxuzi/gumi

Version:

Clean & minimal design system with delightful interactions

28 lines (27 loc) 688 B
export interface CodeCopyOptions { copyText?: string; successText?: string; errorText?: string; showToast?: boolean; buttonClass?: string; iconClass?: string; } export declare class CodeCopy { private element; private options; private button; private isVisible; constructor(element: HTMLElement | string, options?: CodeCopyOptions); private init; private createButton; private bindEvents; private showButton; private hideButton; private copyCode; private getCodeText; private fallbackCopy; private showSuccess; private showError; destroy(): void; static initAll(selector?: string): CodeCopy[]; }