This commit is contained in:
Simon Knott 2025-02-07 14:02:14 +01:00
parent 87a5ef67b6
commit 9d4361b511
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -27,7 +27,11 @@ type CopyToClipboardProps = {
/**
* A copy to clipboard button.
*/
export const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({ value, icon: copyIcon = icons.copy(), title }) => {
export const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({
value,
icon: copyIcon = icons.copy(),
title
}) => {
type IconType = 'copy' | 'check' | 'cross';
const [icon, setIcon] = React.useState<IconType>('copy');
const handleCopy = React.useCallback(() => {