mirror of
https://github.com/openziti/zrok.git
synced 2026-08-29 18:34:11 -05:00
15 lines
364 B
JavaScript
15 lines
364 B
JavaScript
import Icon from "@mdi/react";
|
|
import {mdiContentCopy} from "@mdi/js";
|
|
|
|
const Copy = (props) => {
|
|
function handleClick(event) {
|
|
navigator.clipboard.writeText(props.text);
|
|
console.log("copied", props.text);
|
|
}
|
|
|
|
return (
|
|
<button onClick={handleClick}><Icon path={mdiContentCopy} size={0.5}/></button>
|
|
);
|
|
}
|
|
|
|
export default Copy; |