npm.io
4.1.0 • Published 3 years ago

react-copy-the-text

Licence
MIT
Version
4.1.0
Deps
9
Size
3 kB
Vulns
0
Weekly
0

CopyText

A React component for copying text to the clipboard.

Installation

Usage



import React from 'react';
import CopyText from 'react-copy-the-text';

const App: React.FC = () => {
  const handleCopy = () => {
    console.log('Text copied!');
    // Perform any additional actions upon copying the text
  };

  return (
    <div>
      <CopyText text="Sanju!" onCopy={handleCopy} />
    </div>
  );
};

export default App;

Keywords