fix param default value

This commit is contained in:
Max Alekseenko
2024-08-28 15:02:38 +02:00
parent 9e3b549112
commit 74adad7e4e
+2 -2
View File
@@ -12,10 +12,10 @@ export interface Props {
size?: number;
type?: 'link';
icon?: IconName;
variant?: 'simple';
variant?: string;
}
const CopyToClipboard = ({ text, className, isLoading, onClick, size = 5, type, icon, variant }: Props) => {
const CopyToClipboard = ({ text, className, isLoading, onClick, size = 5, type, icon, variant = 'simple' }: Props) => {
const { hasCopied, onCopy } = useClipboard(text, 1000);
const [ copied, setCopied ] = useState(false);
// have to implement controlled tooltip because of the issue - https://github.com/chakra-ui/chakra-ui/issues/7107