2.0.0 • Published 7 months ago

@types/react-clipboardjs-copy v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Installation

npm install --save @types/react-clipboardjs-copy

Summary

This package contains type definitions for react-clipboardjs-copy (https://freeshineit.github.io/react-clipboardjs-copy).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-clipboardjs-copy.

index.d.ts

// Type definitions for react-clipboardjs-copy 1.3
// Project: https://freeshineit.github.io/react-clipboardjs-copy
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as React from 'react';

export as namespace ReactClipboard;

declare class ReactClipboard extends React.PureComponent<ReactClipboard.Props> {}

declare namespace ReactClipboard {
    class ReactClipboard extends React.PureComponent<Props> {}

    interface Options {
        text?: string | undefined;
        container?: HTMLElement;
        target?(text: string, result: boolean): void; // MIME type
    }

    interface Props {
        text?: string;
        target?: string;
        action?: string;
        selection?: boolean;
        onSuccess?(text: string, result: boolean): void;
        onError?(text: string, result: boolean): void;
        options?: Options | undefined;
    }
}

export default ReactClipboard;

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:35:34 GMT
  • Dependencies: @types/react
  • Global values: ReactClipboard

Credits

These definitions were written by DefinitelyTyped.