Skip to content

Commit 21d96ab

Browse files
committed
refactor: ExpandableInfo usage to tailwind
1 parent 065a055 commit 21d96ab

File tree

1 file changed

+35
-26
lines changed

1 file changed

+35
-26
lines changed

src/pages/run-a-node.tsx

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
1919
import { Button, ButtonLink } from "@/components/Buttons"
2020
import Emoji from "@/components/Emoji"
2121
import ExpandableCard from "@/components/ExpandableCard"
22-
import ExpandableInfo from "@/components/ExpandableInfo"
2322
import FeedbackCard from "@/components/FeedbackCard"
2423
import {
2524
DecentralizationGlyphIcon,
@@ -31,7 +30,7 @@ import {
3130
SovereigntyGlyphIcon,
3231
VoteGlyphIcon,
3332
} from "@/components/icons/run-a-node"
34-
import { Image } from "@/components/Image"
33+
import { Image, TwImage } from "@/components/Image"
3534
import InlineLink from "@/components/Link"
3635
import MainArticle from "@/components/MainArticle"
3736
import OldHeading from "@/components/OldHeading"
@@ -40,7 +39,9 @@ import PageHero from "@/components/PageHero"
4039
import PageMetadata from "@/components/PageMetadata"
4140
import { StandaloneQuizWidget as QuizWidget } from "@/components/Quiz/QuizWidget"
4241
import Translation from "@/components/Translation"
42+
import { Stack, VStack } from "@/components/ui/flex"
4343

44+
import { cn } from "@/lib/utils/cn"
4445
import { existsNamespace } from "@/lib/utils/existsNamespace"
4546
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
4647
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -284,10 +285,6 @@ const StakingCalloutContainer = (props: ChildOnlyProp) => (
284285
/>
285286
)
286287

287-
const StrongParagraph = (props: BoxProps) => (
288-
<Text fontSize="150%" fontWeight="semibold" {...props} />
289-
)
290-
291288
const H2 = (props: HeadingProps) => (
292289
<OldHeading
293290
fontSize={{ base: "2xl", md: "2rem" }}
@@ -474,27 +471,39 @@ const RunANodePage = () => {
474471
</Content>
475472

476473
<FlexContent>
477-
<ExpandableInfo
478-
alignSelf="center"
479-
width={{ base: "full", md: "90%" }}
480-
mb={{ base: 0, md: 4 }}
481-
image={impact}
482-
title={<Translation id="page-run-a-node:page-run-a-node-who-title" />}
483-
contentPreview={
484-
<Translation id="page-run-a-node:page-run-a-node-who-preview" />
485-
}
486-
background="runNodeGradient2"
487-
forceOpen
474+
<VStack
475+
className={cn(
476+
"relative mb-0 w-full gap-0 self-center rounded-sm border p-6 md:mb-4 md:w-[90%]",
477+
"bg-gradient-to-br from-blue-500/20 from-10% to-pink-600/20 to-90%"
478+
)}
488479
>
489-
<Text>
490-
<Translation id="page-run-a-node:page-run-a-node-who-copy-1" />
491-
</Text>
492-
<Text>{t("page-run-a-node-who-copy-2")}</Text>
493-
<Text>{t("page-run-a-node-who-copy-3")}</Text>
494-
<StrongParagraph>
495-
{t("page-run-a-node-who-copy-bold")}
496-
</StrongParagraph>
497-
</ExpandableInfo>
480+
<Stack className="flex-col items-center justify-between gap-8 md:flex-row md:gap-12">
481+
<TwImage
482+
src={impact}
483+
alt=""
484+
sizes="300px"
485+
style={{ width: "300px", height: "auto" }}
486+
/>
487+
<div className="me-4">
488+
<h2 className="mb-5 mt-4 text-2xl font-semibold leading-[1.4] md:text-[2rem]">
489+
<Translation id="page-run-a-node:page-run-a-node-who-title" />
490+
</h2>
491+
<p className="body-medium mb-0">
492+
<Translation id="page-run-a-node:page-run-a-node-who-preview" />
493+
</p>
494+
</div>
495+
</Stack>
496+
<div className="mt-8 border-t pt-6">
497+
<p className="mb-6">
498+
<Translation id="page-run-a-node:page-run-a-node-who-copy-1" />
499+
</p>
500+
<p className="mb-6">{t("page-run-a-node-who-copy-2")}</p>
501+
<p className="mb-6">{t("page-run-a-node-who-copy-3")}</p>
502+
<p className="mb-6 text-[150%] font-semibold leading-none">
503+
{t("page-run-a-node-who-copy-bold")}
504+
</p>
505+
</div>
506+
</VStack>
498507
</FlexContent>
499508

500509
<Content>

0 commit comments

Comments
 (0)