otterscan/src/components/InternalCreate.tsx

31 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-07-21 19:06:51 +00:00
import React from "react";
2021-07-21 18:13:18 +00:00
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
import TransactionAddress from "./TransactionAddress";
2021-07-21 18:13:18 +00:00
import AddressHighlighter from "./AddressHighlighter";
import DecoratedAddressLink from "./DecoratedAddressLink";
import { InternalOperation } from "../types";
2021-07-21 18:13:18 +00:00
type InternalCreateProps = {
2021-07-21 19:06:51 +00:00
internalOp: InternalOperation;
2021-07-21 18:13:18 +00:00
};
const InternalCreate: React.FC<InternalCreateProps> = ({ internalOp }) => (
2021-11-18 18:51:08 +00:00
<div className="flex items-baseline space-x-1 whitespace-nowrap">
<span className="text-gray-500">
<FontAwesomeIcon icon={faAngleRight} size="1x" /> CREATE
</span>
<span>Contract</span>
<div className="flex items-baseline">
<AddressHighlighter address={internalOp.to}>
<DecoratedAddressLink address={internalOp.to} creation />
2021-11-18 18:51:08 +00:00
</AddressHighlighter>
</div>
<span className="flex items-baseline text-gray-400">
(Creator: <TransactionAddress address={internalOp.from} />)
2021-11-18 18:51:08 +00:00
</span>
</div>
);
2021-07-21 18:13:18 +00:00
2021-11-18 18:51:08 +00:00
export default InternalCreate;