mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 13:10:58 +00:00
16 lines
585 B
TypeScript
16 lines
585 B
TypeScript
export interface UseClipboardOptions {
|
|
/** Time in ms after which the copied state will reset, `2000` by default */
|
|
timeout?: number;
|
|
}
|
|
export interface UseClipboardReturnValue {
|
|
/** Function to copy value to clipboard */
|
|
copy: (value: any) => void;
|
|
/** Function to reset copied state and error */
|
|
reset: () => void;
|
|
/** Error if copying failed */
|
|
error: Error | null;
|
|
/** Boolean indicating if the value was copied successfully */
|
|
copied: boolean;
|
|
}
|
|
export declare function useClipboard(options?: UseClipboardOptions): UseClipboardReturnValue;
|