import React, { useState } from 'react';
import Button from './Button';
import { FormattedMessage } from 'react-intl';
const defaultText = (
);
export default function CopyButton({ element, ...props }) {
const [text, setText] = useState(defaultText);
function handleClick() {
if (element?.current) {
element.current.select();
document.execCommand('copy');
setText();
window.getSelection().removeAllRanges();
}
}
return (
);
}