Skip to content

Commit 89d1915

Browse files
committed
remove custom classnames and migrate chakra styling from wrappers
1 parent 4a9f7aa commit 89d1915

File tree

4 files changed

+10
-57
lines changed

4 files changed

+10
-57
lines changed

src/components/ActionCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ const ActionCard = ({
4141
return (
4242
<LinkBox
4343
className={cn(
44-
"m-4 flex flex-none shadow-table hover:scale-[1.02] hover:rounded hover:bg-background-highlight hover:shadow-table-box-hover hover:duration-100 focus:scale-[1.02] focus:rounded focus:shadow-table-box-hover focus:duration-100",
44+
"flex shadow-table hover:scale-[1.02] hover:rounded hover:bg-background-highlight hover:shadow-table-box-hover hover:duration-100 focus:scale-[1.02] focus:rounded focus:shadow-table-box-hover focus:duration-100",
4545
className
4646
)}
4747
{...props}
4848
>
4949
<Flex
5050
className={cn(
51-
"action-card-image-wrapper flex h-[260px] flex-row bg-gradient-to-r from-accent-a/10 to-accent-c/10",
51+
"flex h-[260px] flex-row bg-gradient-to-r from-accent-a/10 to-accent-c/10",
5252
isBottom ? "items-end" : "items-center",
5353
isRight ? "justify-end" : "justify-center"
5454
)}
@@ -57,10 +57,10 @@ const ActionCard = ({
5757
src={image}
5858
alt={alt || ""}
5959
width={imageWidth}
60-
className="max-h-full object-cover"
60+
className="max-h-full object-cover p-4"
6161
/>
6262
</Flex>
63-
<div className="action-card-content p-6">
63+
<div className="flex flex-col justify-center p-6">
6464
<h3 className="mb-4 mt-2 text-2xl font-semibold leading-snug">
6565
<LinkOverlay asChild>
6666
<InlineLink

src/pages/community.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,8 @@ const CommunityPage = () => {
299299
</Flex>
300300
<SimpleGrid columns={{ base: 1, lg: 2 }} spacing={{ base: 8, lg: 0 }}>
301301
{cards.map((card, idx) => (
302-
<Box
303-
as={ActionCard}
304-
minW={{ base: "min(100%, 240px)", lg: "440px" }}
305-
m={{ base: 0, lg: 4 }}
306-
borderRadius="sm"
307-
border="1px solid"
308-
borderColor="text"
309-
bg="background.base"
310-
boxShadow={theme.colors.cardBoxShadow}
302+
<ActionCard
303+
className="m-0 flex-col rounded-sm border lg:m-4"
311304
key={idx}
312305
title={card.title}
313306
description={card.description}

src/pages/contributing/translation-program/acknowledgements.tsx

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ const TranslatorAcknowledgements = () => {
198198
"page-contributing-translation-program-acknowledgements-our-translators-1"
199199
)}
200200
</Text>
201-
<Box
202-
as={ActionCard}
201+
<ActionCard
202+
className="my-8"
203+
imageWidth={260}
203204
href="/contributing/translation-program/contributors/"
204205
title={t(
205206
"page-contributing-translation-program-acknowledgements-our-translators-view-all"
@@ -208,25 +209,6 @@ const TranslatorAcknowledgements = () => {
208209
"page-contributing-translation-program-acknowledgements-our-translators-cta"
209210
)}
210211
image={whatIsEthereumImg}
211-
display={{ base: "block", sm: "flex" }}
212-
flex="none"
213-
my={8}
214-
mx={0}
215-
sx={{
216-
".action-card-image-wrapper": {
217-
p: 4,
218-
minW: { sm: "260px" },
219-
},
220-
".action-card-content": {
221-
display: { sm: "flex" },
222-
justifyContent: { sm: "center" },
223-
flexDirection: { sm: "column" },
224-
ms: { sm: 4 },
225-
},
226-
p: {
227-
mb: 0,
228-
},
229-
}}
230212
/>
231213
</Content>
232214

src/pages/eth.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -241,29 +241,7 @@ const CentralColumn = (props: ChildOnlyProp) => (
241241
)
242242

243243
const CentralActionCard = (props: ComponentProps<typeof ActionCard>) => (
244-
<Box
245-
as={ActionCard}
246-
display={{ base: "block", sm: "flex" }}
247-
flex="none"
248-
my={8}
249-
mx={0}
250-
sx={{
251-
".action-card-image-wrapper": {
252-
p: 4,
253-
minW: { sm: "260px" },
254-
},
255-
".action-card-content": {
256-
display: { sm: "flex" },
257-
justifyContent: { sm: "center" },
258-
flexDirection: { sm: "column" },
259-
ms: { sm: 4 },
260-
},
261-
p: {
262-
mb: { sm: 0 },
263-
},
264-
}}
265-
{...props}
266-
/>
244+
<ActionCard className="my-8" imageWidth={260} {...props} />
267245
)
268246

269247
export const getStaticProps = (async ({ locale }) => {

0 commit comments

Comments
 (0)