Skip to content

Commit 6e56963

Browse files
refactor(Heading): replace customer heading component
1 parent 7aba0d4 commit 6e56963

File tree

5 files changed

+8
-98
lines changed

5 files changed

+8
-98
lines changed

src/components/Heading/index.tsx

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/pages/developers/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
88
import Callout from "@/components/Callout"
99
import Card, { CardProps } from "@/components/Card"
1010
import FeedbackCard from "@/components/FeedbackCard"
11-
import Heading from "@/components/Heading"
1211
import HubHero from "@/components/Hero/HubHero"
1312
import { Image } from "@/components/Image"
1413
import MainArticle from "@/components/MainArticle"
@@ -120,7 +119,7 @@ const SpeedRunEthereumBanner = ({
120119
style={{ width: "100vw", objectFit: "cover", objectPosition: "20%" }}
121120
/>
122121
<Stack className="absolute top-0 max-w-lg items-start space-y-3 break-words p-6 md:top-12 md:ms-8 md:space-y-4 lg:p-8 xl:max-w-xl">
123-
<Heading>{title}</Heading>
122+
<h2>{title}</h2>
124123
<ButtonLink href="https://speedrunethereum.com/">{linkLabel}</ButtonLink>
125124
</Stack>
126125
</div>

src/pages/developers/local-environment.tsx

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
77
import { Framework } from "@/lib/interfaces"
88

99
import FeedbackCard from "@/components/FeedbackCard"
10-
import Heading from "@/components/Heading"
1110
import { Image } from "@/components/Image"
1211
import MainArticle from "@/components/MainArticle"
1312
import PageMetadata from "@/components/PageMetadata"
@@ -87,20 +86,9 @@ const LocalEnvironmentPage = ({
8786
description={t("page-local-environment-setup-meta-desc")}
8887
/>
8988
<div className="mb-8 w-full justify-center px-8 pb-8 pt-0 xl:pb-4 xl:pt-4">
90-
<Heading
91-
as="h1"
92-
fontStyle="normal"
93-
fontFamily="monospace"
94-
textTransform="uppercase"
95-
fontWeight="semibold"
96-
fontSize="2rem"
97-
lineHeight={1.4}
98-
textAlign="center"
99-
mt={0}
100-
mb="1.625rem"
101-
>
89+
<h1 className="mb-[1.625rem] text-center font-monospace text-[2rem] font-semibold uppercase not-italic leading-[1.4]">
10290
<Translation id="page-developers-local-environment:page-local-environment-setup-title" />
103-
</Heading>
91+
</h1>
10492
<Text className="mb-2 text-center leading-xs text-body-medium">
10593
<Translation id="page-developers-local-environment:page-local-environment-setup-subtitle" />
10694
<br />
@@ -110,14 +98,9 @@ const LocalEnvironmentPage = ({
11098
<Content>
11199
<Flex className="w-full flex-col-reverse items-start justify-between lg:flex-row lg:items-center">
112100
<Column>
113-
<Heading
114-
fontSize={{ base: "2xl", md: "2rem" }}
115-
lineHeight={1.4}
116-
mt={0}
117-
mb="1.625rem"
118-
>
101+
<h2 className="mb-[1.625rem] text-2xl leading-[1.4] md:text-[2rem]">
119102
<Translation id="page-developers-local-environment:page-local-environment-frameworks-title" />
120-
</Heading>
103+
</h2>
121104
<Text>
122105
<Translation id="page-developers-local-environment:page-local-environment-frameworks-desc" />
123106
</Text>

src/pages/developers/tutorials.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { BasePageProps, Lang } from "@/lib/types"
1616

1717
import Emoji from "@/components/Emoji"
1818
import FeedbackCard from "@/components/FeedbackCard"
19-
import Heading from "@/components/Heading"
2019
import MainArticle from "@/components/MainArticle"
2120
import PageMetadata from "@/components/PageMetadata"
2221
import Translation from "@/components/Translation"
@@ -218,21 +217,9 @@ const TutorialPage = ({
218217
"page-developers-tutorials:page-tutorials-meta-description"
219218
)}
220219
/>
221-
<Heading
222-
as="h1"
223-
fontStyle="normal"
224-
fontWeight="semibold"
225-
fontFamily="monospace"
226-
textTransform="uppercase"
227-
fontSize="2rem"
228-
lineHeight="140%"
229-
textAlign="center"
230-
mt={{ base: 4, sm: 0 }}
231-
mx={{ base: 4, sm: 0 }}
232-
mb={{ base: 4, sm: "1.625rem" }}
233-
>
220+
<h1 className="no-italic mb-4 text-center font-monospace text-[2rem] font-semibold uppercase leading-[1.4] max-sm:mx-4 max-sm:mt-4 sm:mb-[1.625rem]">
234221
<Translation id="page-developers-tutorials:page-tutorial-title" />
235-
</Heading>
222+
</h1>
236223
<Text className="mb-4 text-center leading-xs text-body-medium">
237224
<Translation id="page-developers-tutorials:page-tutorial-subtitle" />
238225
</Text>

src/pages/staking/deposit-contract.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import CardList from "@/components/CardList"
1717
import CopyToClipboard from "@/components/CopyToClipboard"
1818
import Emoji from "@/components/Emoji"
1919
import FeedbackCard from "@/components/FeedbackCard"
20-
import Heading from "@/components/Heading"
2120
import { Image } from "@/components/Image"
2221
import InfoBanner from "@/components/InfoBanner"
2322
import MainArticle from "@/components/MainArticle"
@@ -127,14 +126,7 @@ const Row = (props: ChildOnlyProp) => (
127126
)
128127

129128
const CardTitle = (props: ChildOnlyProp) => (
130-
<Heading
131-
as="h2"
132-
mb={4}
133-
fontWeight="600"
134-
fontSize="2rem"
135-
lineHeight={1.4}
136-
{...props}
137-
/>
129+
<h2 className="mb-4 text-[2rem] font-semibold leading-[1.4]" {...props} />
138130
)
139131

140132
const Caption = (props: ChildOnlyProp) => (

0 commit comments

Comments
 (0)