Skip to content

Commit 1a5b531

Browse files
committed
ui fixes from code review
1 parent e55fb16 commit 1a5b531

File tree

1 file changed

+36
-17
lines changed

1 file changed

+36
-17
lines changed

src/pages-conditional/eth.tsx

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
FlexProps,
77
Heading,
88
HeadingProps,
9-
SimpleGrid,
109
Text,
1110
} from "@chakra-ui/react"
1211
import { GatsbyImage } from "gatsby-plugin-image"
@@ -91,7 +90,7 @@ const Title = (props: ChildOnlyProp) => (
9190
as="h1"
9291
fontSize="sm"
9392
lineHeight={1.4}
94-
letterSpacing="wider"
93+
letterSpacing="0.04em"
9594
fontWeight="500"
9695
mb={4}
9796
mt={0}
@@ -108,15 +107,34 @@ const Subtitle = (props: ChildOnlyProp) => (
108107
const TwoColumnContent = (props: FlexProps) => (
109108
<Flex
110109
w="full"
111-
gap={{ base: 8, lg: 0 }}
112-
align={{ base: "flex-start", lg: "center" }}
113110
direction={{ base: "column", lg: "row" }}
111+
justify="space-between"
114112
p={8}
115113
mb={12}
116114
{...props}
117115
/>
118116
)
119117

118+
export const LeftColumn = (props: ChildOnlyProp) => (
119+
<Box
120+
flex="0 0 50%"
121+
maxW={{ base: "full", lg: "75%" }}
122+
mr={{ lg: 16 }}
123+
{...props}
124+
/>
125+
)
126+
127+
export const RightColumn = (props: ChildOnlyProp) => (
128+
<Flex
129+
flex="0 1 50%"
130+
direction="column"
131+
justify="center"
132+
maxW={{ base: "full", lg: "75%" }}
133+
mt={{ base: 12, lg: 0 }}
134+
{...props}
135+
/>
136+
)
137+
120138
const SubtitleTwo = (props: ChildOnlyProp) => (
121139
<Text fontSize="xl" lineHeight={1.4} color="text300" mb={8} {...props} />
122140
)
@@ -184,7 +202,7 @@ const TextDivider = () => (
184202
h="1px"
185203
bg="searchResultBackground"
186204
my={8}
187-
alignSelf={{ base: "flex-start" }}
205+
alignSelf={{ lg: "flex-start" }}
188206
/>
189207
)
190208

@@ -207,6 +225,7 @@ const CentralActionCard = (props: ComponentProps<typeof ActionCard>) => (
207225
mx={0}
208226
sx={{
209227
".action-card-image-wrapper": {
228+
p: 4,
210229
minW: { sm: "260px" },
211230
},
212231
".action-card-content": {
@@ -503,8 +522,8 @@ const EthPage = (props: PageProps<Queries.EthPageQuery, Context>) => {
503522
</CalloutBanner>
504523
</Content>
505524

506-
<SimpleGrid columns={{ base: 1, lg: 2 }} p={8} spacing={8}>
507-
<Box>
525+
<TwoColumnContent>
526+
<LeftColumn>
508527
<h3>
509528
<Translation id="page-eth-has-value" />
510529
</h3>
@@ -523,13 +542,13 @@ const EthPage = (props: PageProps<Queries.EthPageQuery, Context>) => {
523542
<p>
524543
<Translation id="page-eth-has-value-desc-5" />
525544
</p>
526-
</Box>
527-
<Flex align="center">
545+
</LeftColumn>
546+
<RightColumn>
528547
<CardList content={cardListContent} />
529-
</Flex>
530-
</SimpleGrid>
531-
<SimpleGrid id="tokens" columns={{ base: 1, lg: 2 }} p={8} spacing={8}>
532-
<Box>
548+
</RightColumn>
549+
</TwoColumnContent>
550+
<TwoColumnContent id="tokens" align="flex-start">
551+
<LeftColumn>
533552
<h3>
534553
<Translation id="page-eth-not-only-crypto" />
535554
</h3>
@@ -543,8 +562,8 @@ const EthPage = (props: PageProps<Queries.EthPageQuery, Context>) => {
543562
<Translation id="page-eth-more-on-tokens" />
544563
</h4>
545564
<CardList content={tokenLinks} />
546-
</Box>
547-
<Box>
565+
</LeftColumn>
566+
<RightColumn>
548567
<h3>
549568
<Translation id="page-eth-popular-tokens" />
550569
</h3>
@@ -557,8 +576,8 @@ const EthPage = (props: PageProps<Queries.EthPageQuery, Context>) => {
557576
emojiSize={5}
558577
/>
559578
))}
560-
</Box>
561-
</SimpleGrid>
579+
</RightColumn>
580+
</TwoColumnContent>
562581
<Content>
563582
<Center w="100%">
564583
<QuizWidget quizKey="what-is-ether" />

0 commit comments

Comments
 (0)