Skip to content

Commit 88f3491

Browse files
authored
Merge pull request #14222 from Baystef/migrate/stakinglaunchpadwidget
Migrate StakingLaunchpadWidget to tailwind/shadcn
2 parents 63b3c8e + 1cd6bee commit 88f3491

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

src/components/Staking/StakingLaunchpadWidget.tsx

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import { useState } from "react"
22
import { useTranslation } from "next-i18next"
33
import { FaTools } from "react-icons/fa"
4-
import { Box } from "@chakra-ui/react"
54

6-
import { ButtonLink } from "@/components/Buttons"
7-
import Text from "@/components/OldText"
85
import Translation from "@/components/Translation"
6+
import { ButtonLink } from "@/components/ui/buttons/Button"
7+
import { Flex } from "@/components/ui/flex"
98

109
import { cn } from "@/lib/utils/cn"
1110
import { trackCustomEvent } from "@/lib/utils/matomo"
1211

1312
import Select, { type SelectOnChange } from "../Select"
14-
import { Flex } from "../ui/flex"
1513

1614
type StakingDataOption = { label: string; value: string }
1715

@@ -54,47 +52,44 @@ const StakingLaunchpadWidget = () => {
5452
"bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
5553
)}
5654
>
57-
<Text as="span" color="text200">
55+
<span className="leading-6 text-body-medium">
5856
<Translation id="page-staking:page-staking-launchpad-widget-span" />
59-
</Text>
60-
<Box my={4} maxW={{ md: "50%" }}>
57+
</span>
58+
<div className="my-4 md:max-w-[50%]">
6159
<Select
6260
instanceId="staking-launchpad-select"
6361
options={selectOptions}
6462
onChange={handleChange}
6563
defaultValue={selectOptions[0]}
6664
variant="outline"
6765
/>
68-
</Box>
69-
<Text>
66+
</div>
67+
<p className="mb-6 leading-6">
7068
<Translation id="page-staking:page-staking-launchpad-widget-p1" />
71-
</Text>
72-
<Text>
69+
</p>
70+
<p className="mb-6 leading-6">
7371
<Translation id="page-staking:page-staking-launchpad-widget-p2" />
74-
</Text>
75-
<Box mb={4}>
76-
<ButtonLink
77-
href={data[selection].url}
78-
width={{ base: "full", md: "auto" }}
79-
>
72+
</p>
73+
<div className="mb-4">
74+
<ButtonLink href={data[selection].url} className="w-full md:w-auto">
8075
{selection === "mainnet"
8176
? t("page-staking:page-staking-launchpad-widget-mainnet-start")
8277
: t("page-staking:page-staking-launchpad-widget-testnet-start")}
8378
</ButtonLink>
84-
</Box>
85-
<Text>
79+
</div>
80+
<p className="mb-6 leading-6">
8681
<Translation id="page-staking:page-staking-launchpad-widget-p3" />
87-
</Text>
88-
<Box>
82+
</p>
83+
<div>
8984
<ButtonLink
9085
href="#node-and-client-tools"
9186
variant="outline"
92-
width={{ base: "full", md: "auto" }}
93-
leftIcon={<FaTools />}
87+
className="w-full md:w-auto"
9488
>
89+
<FaTools />{" "}
9590
<Translation id="page-staking:page-staking-launchpad-widget-link" />
9691
</ButtonLink>
97-
</Box>
92+
</div>
9893
</Flex>
9994
)
10095
}

0 commit comments

Comments
 (0)