@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
15 lines • 525 B
TypeScript
import * as React from 'react';
type OnCopied = () => void;
type OnCopyError = (error: unknown) => void;
type OnCopyClick = (event: React.MouseEvent<HTMLButtonElement>) => void;
export type UseCopierOpts = {
onCopied?: OnCopied;
onError?: OnCopyError;
onClick?: OnCopyClick;
timeout?: number;
};
export declare function useCopier(contents: (() => string | undefined) | string, opts?: UseCopierOpts): {
copy: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
recentlySuccessful: boolean;
};
export {};