otterscan/src/address/RawABI.tsx

20 lines
426 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
2021-10-25 02:04:04 +00:00
type RawABIProps = {
2021-09-10 08:17:10 +00:00
abi: any[];
};
2021-10-25 02:04:04 +00:00
const RawABI: React.FC<RawABIProps> = ({ abi }) => (
2021-09-10 08:17:10 +00:00
<SyntaxHighlighter
className="w-full h-60 border font-code text-base"
language="json"
style={docco}
showLineNumbers
>
{JSON.stringify(abi, null, " ") ?? ""}
</SyntaxHighlighter>
);
2021-10-25 02:04:04 +00:00
export default React.memo(RawABI);