Skip to content

Commit 304f2e6

Browse files
committed
[Portal] Feature: Contract deploy button (#5434)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces the `ContractDeployCard` component to the application, allowing users to deploy contracts with a specified name and link. It enhances the user interface by providing a structured card layout for contract deployment. ### Detailed summary - Added `ContractDeployCard` component. - Accepts `contractName`, optional `description`, and `href` props. - Displays a title, description, and a "Deploy Now" link. - Utilizes `Link` from `next/link` for navigation. - Includes usage documentation in the code comments. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 5585def commit 304f2e6

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Link from "next/link";
2+
import { Paragraph } from "./Paragraph";
3+
4+
/**
5+
* Usage:
6+
* ```tsx
7+
* <ContractDeployCard contractName={"ERC20Modular"} href="deploy-link" />
8+
* ```
9+
*/
10+
export function ContractDeployCard(props: {
11+
contractName: string;
12+
description?: string;
13+
href: string;
14+
}) {
15+
return (
16+
<div className="my-4 rounded-lg border bg-b-800 p-4">
17+
<div className="mb-2 font-semibold text-lg ">
18+
Deploy {props.contractName}
19+
</div>
20+
<Paragraph className="mb-5 text-base text-f-300">
21+
{props.description ||
22+
`The ${props.contractName} is available to deploy on Explore. Deploy it now through dashboard.`}
23+
</Paragraph>
24+
<div className="flex">
25+
<Link
26+
href={props.href}
27+
target="_blank"
28+
className="inline-flex items-center rounded-lg border bg-[#DB2877] text-sm duration-200 hover:border-f-300"
29+
>
30+
<div className="border-l-2 p-2.5 font-semibold">Deploy Now</div>
31+
</Link>
32+
</div>
33+
</div>
34+
);
35+
}

0 commit comments

Comments
 (0)