Use light imports

This commit is contained in:
Willian Mitsuda 2021-07-25 04:10:42 -03:00
parent d0a2cf13f5
commit 65ee6e9182
1 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import SyntaxHighlighter from "react-syntax-highlighter"; import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
import hljs from "highlight.js"; import hljs from "highlight.js";
import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs"; import docco from "react-syntax-highlighter/dist/esm/styles/hljs/docco";
import { sourcifySourceFile } from "../url"; import { sourcifySourceFile } from "../url";
@ -44,7 +44,12 @@ const Contract: React.FC<ContractProps> = ({
}, [checksummedAddress, networkId, filename, source.content]); }, [checksummedAddress, networkId, filename, source.content]);
return ( return (
<SyntaxHighlighter language="solidity" style={docco} showLineNumbers> <SyntaxHighlighter
className="w-full h-full border font-code text-base"
language="solidity"
style={docco}
showLineNumbers
>
{content ?? ""} {content ?? ""}
</SyntaxHighlighter> </SyntaxHighlighter>
); );