onClick={() => {navigator.clipboard.writeText(this.state.textToCopy)}}
<button
onClick={() => navigator.clipboard.writeText('Copy this text to clipboard')}
>
Copy
</button>
onClick={() => {navigator.clipboard.writeText(this.state.textToCopy)}}
<button onClick={() => navigator.clipboard.writeText('Copy this text to clipboard')}
>
Copy
</button>
import {CopyField} from '@eisberg-labs/mui-copy-field';
<CopyField
label="Click on copy Button"
value={"Enter text"}
onCopySuccess={console.log}
onCopyError={console.log}
copyTooltip={"Some copy tooltip. Default is Copy"}
/>