import { Clipboard } from "./Icons/Clipboard"; import { Col, Input, Row } from "antd"; import { IOView } from "../types"; import { useState } from "react"; import CopyToClipboard from "react-copy-to-clipboard"; export const CopyClipboardHashInput: IOView<{ hash: string; highlight?: boolean }> = ({ hash, highlight }) => { const [showCopyText, setShowCopyText] = useState(false); return (
{ setShowCopyText(true); setTimeout(() => { setShowCopyText(false); }, 3000); }} > {/* */} {highlight && (

{hash}

)} {(showCopyText || highlight) && (

Copied to clipboard!

)}
); };