
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@gradeup/copy-text-to-cb
Advanced tools
react component to copy text to clipboard with function to execute after copying.
React component to copy text to clipboard on clicking with function to execute after copying.
npm install --save @gradeup/copy-text-to-cb
import CopyText from '@gradeup/copy-text-to-cb'; // React Component to be used for copying text on click
usage
import CopyText from '@gradeup/copy-text-to-cb';
<CopyText
text="Hello copy text"
component={props => <button {...props}>Copy</button>}
cb={console.log}
/>
Folowing are the params to be passed :
| option | used for | required | default |
|---|---|---|---|
text | text to be copied | true | - |
component | component on which click is to be activated | false | props => <button type="button" {...props}>Copy</button> |
| cb | function to execute after copying | false | () => {} |
| pop | pop message to show after copying or not | false | true |
| popStyle | pop box style | false | position: 'absolute', background: '#333', color: '#fff', padding: '3px', align: 'center', fontSize: '12px', transform: 'translateX(-50%)', left: '50%',transition: 'all 0.3s ease' |
Change the text and enjoy copying on your website.
You can visit some links for reference:
FAQs
react component to copy text to clipboard with function to execute after copying.
We found that @gradeup/copy-text-to-cb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.