Skip to content

Commit c561f11

Browse files
committed
migrate: UpgradeStatus to tw; rm old tokens
rm upgradeStatusBackground, upgradeStatusShippedBackground, upgradeStatusBorder and upgradeStatusShippedBorder src/theme tokens
1 parent 6494b54 commit c561f11

File tree

2 files changed

+15
-44
lines changed

2 files changed

+15
-44
lines changed

src/components/UpgradeStatus.tsx

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
import React from "react"
21
import { useTranslation } from "next-i18next"
3-
import { Heading, VStack } from "@chakra-ui/react"
4-
import { useColorModeValue } from "@chakra-ui/react"
52

63
import type { TranslationKey } from "@/lib/types"
74

8-
import Text from "./OldText"
9-
10-
export interface IStyledContainer {
11-
isShipped: boolean
12-
}
5+
import { cn } from "@/lib/utils/cn"
136

147
export type UpgradeStatusProps = {
158
children?: React.ReactNode
@@ -22,37 +15,25 @@ const UpgradeStatus = ({
2215
children,
2316
isShipped = false,
2417
}: UpgradeStatusProps) => {
25-
const border = useColorModeValue("none", "2px solid")
26-
const darkBorderColor = isShipped ? "#3fb181" : "#a4a4ff"
27-
const borderColor = useColorModeValue(undefined, darkBorderColor)
2818
const { t } = useTranslation("page-staking")
2919

3020
return (
31-
<VStack
32-
as="aside"
33-
alignItems="start"
34-
bg={
35-
isShipped ? "upgradeStatusShippedBackground" : "upgradeStatusBackground"
36-
}
37-
border={border}
38-
borderColor={borderColor}
39-
borderRadius="base"
40-
boxShadow={`0px 4px 7px rgba(0, 0, 0, 0.05), 0px 10px 17px rgba(0, 0, 0, 0.03),
41-
0px 14px 66px rgba(0, 0, 0, 0.07)`}
42-
mb={8}
43-
mt={{ base: 8, lg: 0 }}
44-
p={6}
45-
spacing={6}
46-
width="100%"
21+
<aside
22+
className={cn(
23+
"my-8 flex w-full flex-col gap-6 rounded p-6 shadow-2xl lg:mt-0",
24+
"bg-black/80 bg-gradient-to-b from-accent-c/10",
25+
"dark:border-2 dark:bg-gray-700 dark:from-transparent",
26+
isShipped
27+
? "bg-success-light dark:border-success"
28+
: "bg-accent-a/20 dark:border-primary"
29+
)}
4730
>
48-
<Heading fontSize="sm" fontWeight="normal" textTransform="uppercase">
31+
<h2 className="text-sm font-normal uppercase">
4932
{t("common:consensus-when-shipping")}
50-
</Heading>
51-
<Text fontSize="2.5rem" fontWeight="bold" lineHeight="100%">
52-
{t(dateKey)}
53-
</Text>
54-
<Text fontSize="xl">{children}</Text>
55-
</VStack>
33+
</h2>
34+
<p className="mb-6 text-4xl font-bold leading-none">{t(dateKey)}</p>
35+
<p className="text-xl">{children}</p>
36+
</aside>
5637
)
5738
}
5839

src/theme.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,6 @@ const lightColors = {
206206
grayBackground: "#fcfcfc",
207207
cardGradient:
208208
"radial-gradient(46.28% 66.31% at 66.95% 58.35%, #e6e6f7 0%, #e7edfa 50%, #e9fbfa 100%)",
209-
upgradeStatusBackground:
210-
"linear-gradient(180deg, rgba(0, 240, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), #1c1ce1",
211-
upgradeStatusShippedBackground:
212-
"linear-gradient(180deg, rgba(0, 240, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), #109e62",
213-
upgradeStatusBorder: "none",
214-
upgradeStatusShippedBorder: "none",
215209
warning: primaryDark100,
216210
warningLink: primaryDark700,
217211
warningLinkHover: primaryDark900,
@@ -317,10 +311,6 @@ const darkColors = {
317311
displayDark: "block",
318312
displayLight: "none",
319313
grayBackground: "#272627",
320-
upgradeStatusBackground: "#222222",
321-
upgradeStatusShippedBackground: "#222222",
322-
upgradeStatusBorder: `${primaryLight200} solid 2px`,
323-
upgradeStatusShippedBorder: `${success400} solid 2px`,
324314
warning: primaryDark100,
325315
warningLink: primaryDark700,
326316
warningLinkHover: primaryDark900,

0 commit comments

Comments
 (0)