Add copy operation to abi

This commit is contained in:
Willian Mitsuda 2021-09-12 21:30:42 -03:00
parent 303458e431
commit daae37a6ab
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown"; import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown";
import ContentFrame from "../ContentFrame"; import ContentFrame from "../ContentFrame";
import InfoRow from "../components/InfoRow"; import InfoRow from "../components/InfoRow";
import Copy from "../components/Copy";
import ABI from "./ABI"; import ABI from "./ABI";
import Contract from "./Contract"; import Contract from "./Contract";
import { RuntimeContext } from "../useRuntime"; import { RuntimeContext } from "../useRuntime";
@ -91,7 +92,8 @@ const Contracts: React.FC<ContractsProps> = ({
{rawMetadata.output.abi && ( {rawMetadata.output.abi && (
<div className="mb-3"> <div className="mb-3">
<div className="flex space-x-2 text-sm border-l border-r border-t rounded-t px-2 py-1"> <div className="flex space-x-2 text-sm border-l border-r border-t rounded-t px-2 py-1">
ABI <span>ABI</span>
<Copy value={JSON.stringify(rawMetadata.output.abi)} />
</div> </div>
<ABI abi={rawMetadata.output.abi} /> <ABI abi={rawMetadata.output.abi} />
</div> </div>