otterscan/src/address/ABI.tsx

20 lines
414 B
TypeScript
Raw Normal View History

2021-09-10 08:17:10 +00:00
import React from "react";
import { SyntaxHighlighter, docco } from "../highlight-init";
2021-09-10 08:17:10 +00:00
type ABIProps = {
abi: any[];
};
const ABI: React.FC<ABIProps> = ({ abi }) => (
<SyntaxHighlighter
className="w-full h-60 border font-code text-base"
language="json"
style={docco}
showLineNumbers
>
{JSON.stringify(abi, null, " ") ?? ""}
</SyntaxHighlighter>
);
export default React.memo(ABI);