Function useClipboard

  • A custom hook to copy and paste data using the clipboard.

    Returns {
        copy: ((data) => Promise<void>);
        paste: (() => Promise<undefined | string>);
    }

    • copy: ((data) => Promise<void>)
        • (data): Promise<void>
        • Add an item to the clipboard.

          Parameters

          • data: string

            The data to copy.

          Returns Promise<void>

    • paste: (() => Promise<undefined | string>)
        • (): Promise<undefined | string>
        • Retrieve an item from the clipboard.

          Returns Promise<undefined | string>

Generated using TypeDoc