Skip to content

Commit 62453c8

Browse files
committed
feat: add button to send user to token registry, once token is issued
1 parent 61f5cfe commit 62453c8

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/components/Button/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ButtonIconColorScheme, ButtonIconType, ButtonType } from "@/shared/type
33
import classNames from "classnames";
44
import { FC, useMemo } from "react";
55
import { Spinner } from "../Spinner";
6+
import Link from "next/link";
67

78
interface ButtonProps {
89
label: string;
@@ -14,6 +15,8 @@ interface ButtonProps {
1415
className?: string;
1516
iconClassName?: string;
1617
loading?: boolean;
18+
link?: boolean;
19+
href?: string;
1720
}
1821

1922
export const Button: FC<ButtonProps> = ({
@@ -26,6 +29,8 @@ export const Button: FC<ButtonProps> = ({
2629
className,
2730
iconClassName,
2831
loading,
32+
link = false,
33+
href = '',
2934
}) => {
3035
const buttonCx = classNames('flex items-center justify-center gap-1 rounded-xl text-base py-3 px-12 w-full text-nowrap whitespace-nowrap font-noto-sans enabled:hover:opacity-50', {
3136
'bg-green-gradient text-[#21262E]': type === 'primary' && !disabled,
@@ -67,6 +72,15 @@ export const Button: FC<ButtonProps> = ({
6772
);
6873
}
6974

75+
if (link) {
76+
return (
77+
<Link href={href} target="_blank" rel="noopener noreferrer" className={buttonCx}>
78+
{renderIcon}
79+
{label}
80+
</Link>
81+
);
82+
}
83+
7084
return (
7185
<button
7286
type="button"

src/components/SuccessIssueFTModal/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,20 @@ export const SuccessIssueFTModal = () => {
176176
className="!items-start"
177177
/>
178178
</div>
179-
<div className="flex items-center w-full">
179+
<div className="flex flex-col md:flex-row items-center gap-2 w-full">
180180
<Button
181181
label="Done"
182182
onClick={handleClose}
183+
type={ButtonType.Secondary}
184+
className="text-sm !py-2 px-6 !rounded-[10px] font-semibold"
185+
/>
186+
<Button
187+
label="Register Your Token"
183188
type={ButtonType.Primary}
184-
className="text-sm !py-2 px-6 rounded-[10px] font-semibold"
189+
className="text-sm !py-2 px-6 !rounded-[10px] font-semibold hover:opacity-80"
190+
disabled={false}
191+
link={true}
192+
href="https://github.com/CoreumFoundation/token-registry"
185193
/>
186194
</div>
187195
</div>

0 commit comments

Comments
 (0)