From dd490ee905f6fb6494cea5c64392ff95b9119a63 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Tue, 7 Sep 2021 01:10:19 -0300 Subject: [PATCH] Style source selector menu --- src/address/Contracts.tsx | 72 +++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/src/address/Contracts.tsx b/src/address/Contracts.tsx index f22756b..8e73a23 100644 --- a/src/address/Contracts.tsx +++ b/src/address/Contracts.tsx @@ -1,6 +1,8 @@ import React, { useState, useEffect, useContext, Fragment } from "react"; import { commify } from "@ethersproject/units"; -import { Switch, Tab } from "@headlessui/react"; +import { Menu, Switch } from "@headlessui/react"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown"; import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import Contract from "./Contract"; @@ -78,36 +80,46 @@ const Contracts: React.FC = ({ )} {rawMetadata !== undefined && rawMetadata !== null && (
- {provider && ( -
- - Open in Remix - -
- )} - - - {Object.entries(rawMetadata.sources).map(([k]) => ( - - - - ))} - - + Open in Remix + +
+ )} + +
+ + {Object.entries(rawMetadata.sources).map(([k]) => ( + + + + ))} + +
+ {selected && (