0

I have a sweet alert in one of my react component which displays an Id(ex:Student Id) from an API. Right now, i am able to display the Id in the sweet alert with some message. But i have to make the id as single-click-copy. Please help me with this.

Ex: Student Id is std123. I want to make this std123 as single click copy.

Abhi
  • 23
  • 5
  • Please share your code. What have you tried so far? [Guide on how to ask](https://stackoverflow.com/help/how-to-ask). – Daan Nov 29 '19 at 08:17
  • Possible duplicate of [How do I copy to the clipboard in JavaScript?](https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript) – Daan Nov 29 '19 at 08:21
  • html={ "Student ID" +()} I am adding singleclick copy component to the html property of the sweetalert – Abhi Nov 29 '19 at 11:25

0 Answers0