Skip to content

Commit 97aef7d

Browse files
committed
refactor(stakinglaunchpadwidget): migrate stakinglaunchpadwidget to tailwind/shadcn
1 parent 6ff213c commit 97aef7d

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

src/components/Staking/StakingLaunchpadWidget.tsx

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +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"
8+
import Select, { type SelectOnChange } from "@/components/ui/Select"
99

1010
import { cn } from "@/lib/utils/cn"
1111
import { trackCustomEvent } from "@/lib/utils/matomo"
1212

13-
import { Flex } from "../ui/flex"
14-
import Select, { type SelectOnChange } from "../ui/Select"
15-
1613
type StakingDataOption = { label: string; value: string }
1714

1815
const StakingLaunchpadWidget = () => {
@@ -54,47 +51,44 @@ const StakingLaunchpadWidget = () => {
5451
"bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
5552
)}
5653
>
57-
<Text as="span" color="text200">
54+
<span className="leading-6 text-body-medium">
5855
<Translation id="page-staking:page-staking-launchpad-widget-span" />
59-
</Text>
60-
<Box my={4} maxW={{ md: "50%" }}>
56+
</span>
57+
<div className="my-4 md:max-w-[50%]">
6158
<Select
6259
instanceId="staking-launchpad-select"
6360
options={selectOptions}
6461
onChange={handleChange}
6562
defaultValue={selectOptions[0]}
6663
variant="outline"
6764
/>
68-
</Box>
69-
<Text>
65+
</div>
66+
<p className="mb-6 leading-6">
7067
<Translation id="page-staking:page-staking-launchpad-widget-p1" />
71-
</Text>
72-
<Text>
68+
</p>
69+
<p className="mb-6 leading-6">
7370
<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-
>
71+
</p>
72+
<div className="mb-4">
73+
<ButtonLink href={data[selection].url} className="w-full md:w-auto">
8074
{selection === "mainnet"
8175
? t("page-staking:page-staking-launchpad-widget-mainnet-start")
8276
: t("page-staking:page-staking-launchpad-widget-testnet-start")}
8377
</ButtonLink>
84-
</Box>
85-
<Text>
78+
</div>
79+
<p className="mb-6 leading-6">
8680
<Translation id="page-staking:page-staking-launchpad-widget-p3" />
87-
</Text>
88-
<Box>
81+
</p>
82+
<div>
8983
<ButtonLink
9084
href="#node-and-client-tools"
9185
variant="outline"
92-
width={{ base: "full", md: "auto" }}
93-
leftIcon={<FaTools />}
86+
className="w-full md:w-auto"
9487
>
88+
<FaTools />{" "}
9589
<Translation id="page-staking:page-staking-launchpad-widget-link" />
9690
</ButtonLink>
97-
</Box>
91+
</div>
9892
</Flex>
9993
)
10094
}

0 commit comments

Comments
 (0)