'use client'; import { Button } from "@/components/ui/button"; import { CopyIcon, CheckIcon } from "lucide-react"; import { useState } from "react"; export function CopyButton({ onCopy, label, successLabel, }: { onCopy: () => void; label: string; successLabel: string; }) { const [showCopySuccess, setShowCopySuccess] = useState(false); const handleCopy = () => { onCopy(); setShowCopySuccess(true); setTimeout(() => { setShowCopySuccess(false); }, 500); } return ( ); }