Skip to content

Commit aef2f26

Browse files
committed
migrate components to new emoji api
1 parent 140bc7f commit aef2f26

33 files changed

+107
-118
lines changed

src/components/AssetDownload/AssetDownloadArtist.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const AssetDownloadArtist = ({
2626
borderRadius="0 0 4px 4px"
2727
>
2828
<Flex me="2" fontSize="md" textColor="text300">
29-
<Emoji text=":artist_palette:" me="2" fontSize="2xl" />
29+
<Emoji text=":artist_palette:" className="me-2 text-2xl" />
3030
{t("page-assets-download-artist")}
3131
</Flex>
3232
{artistUrl && <Link href={artistUrl}>{artistName}</Link>}

src/components/Banners/UpgradeBannerNotification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import BannerNotification from "./BannerNotification"
77

88
const UpgradeBannerNotification = () => (
99
<BannerNotification shouldShow>
10-
<Emoji text=":megaphone:" me={4} fontSize="2xl" flexShrink="0" />
10+
<Emoji text=":megaphone:" className="me-4 flex-shrink-0 text-2xl" />
1111
<Box>
1212
<b>
1313
We&apos;ve deprecated our use of &apos;Eth1&apos; and &apos;Eth2&apos;

src/components/BoxGrid.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState } from "react"
22
import { Box, Flex, GridItem, SimpleGrid } from "@chakra-ui/react"
33

4+
import { cn } from "@/lib/utils/cn"
45
import { MatomoEventOptions, trackCustomEvent } from "@/lib/utils/matomo"
56

67
import Emoji from "./Emoji"
@@ -90,18 +91,13 @@ const BoxGrid = ({ items }: BoxGridProps) => {
9091
key={idx}
9192
>
9293
<Emoji
93-
m={2}
94+
className={cn(
95+
"m-2 text-8xl",
96+
isOpen
97+
? "mb-8"
98+
: "self-center hover:rotate-12 hover:duration-500"
99+
)}
94100
text={item.emoji}
95-
fontSize="8xl"
96-
{...(isOpen
97-
? { mb: 8 }
98-
: {
99-
alignSelf: "center",
100-
_hover: {
101-
transition: "transform 50s",
102-
transform: "rotate(10turn)",
103-
},
104-
})}
105101
/>
106102
<Box>
107103
<OldHeading

src/components/Callout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Callout = ({
5555
)}
5656
<Flex direction="column" justify="space-between" h="full">
5757
<div>
58-
{emoji && <Emoji text={emoji} fontSize="5xl" />}
58+
{emoji && <Emoji text={emoji} className="text-5xl" />}
5959
<OldHeading as="h3" fontSize="2xl" lineHeight={1.4}>
6060
{t(titleKey)}
6161
</OldHeading>

src/components/Card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Card = ({ emoji, title, description, children, ...props }: CardProps) => (
2323
{...props}
2424
>
2525
<Stack spacing="4">
26-
{emoji && <Emoji fontSize="5xl" lineHeight={0} text={emoji} />}
26+
{emoji && <Emoji className="text-5xl leading-none" text={emoji} />}
2727
<Stack spacing="8">
2828
{title && (
2929
<Heading as="h3" fontSize="2xl">

src/components/CentralizedExchanges/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const EmptyStateText = (props: ChildOnlyProp) => (
5252

5353
const NoResults = ({ children }) => (
5454
<EmptyStateContainer>
55-
<Emoji text=":crying_face:" fontSize="80px" />
55+
<Emoji text=":crying_face:" className="text-[80px]" />
5656
<EmptyStateText>
5757
{/* TODO: Fix `children` structure to include email link within i18n string */}
5858
{children}{" "}
@@ -68,7 +68,7 @@ const NoResultsSingle = ({ children }) => (
6868
{children}{" "}
6969
<InlineLink href={`mailto:${WEBSITE_EMAIL}`}>{WEBSITE_EMAIL}</InlineLink>.
7070
</Text>
71-
<Emoji text=":crying_face:" fontSize="80px" />
71+
<Emoji text=":crying_face:" className="text-[80px]" />
7272
</Center>
7373
)
7474

@@ -115,7 +115,7 @@ const CentralizedExchanges = ({
115115
</Box>
116116
{!hasSelectedCountry && (
117117
<EmptyStateContainer>
118-
<Emoji text=":world_map:" fontSize="80px" />
118+
<Emoji text=":world_map:" className="text-[80px]" />
119119
<EmptyStateText>
120120
{t("page-get-eth-exchanges-empty-state-text")}
121121
</EmptyStateText>

src/components/Codeblock.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,15 @@ const Codeblock = ({
331331
<TopBarItem>
332332
{!isCopied ? (
333333
<>
334-
<Emoji text=":clipboard:" fontSize="md" />{" "}
334+
<Emoji text=":clipboard:" className="text-md" />{" "}
335335
{t("copy")}
336336
</>
337337
) : (
338338
<>
339-
<Emoji text=":white_check_mark:" fontSize="md" />{" "}
339+
<Emoji
340+
text=":white_check_mark:"
341+
className="text-md"
342+
/>{" "}
340343
{t("copied")}
341344
</>
342345
)}

src/components/DocLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const DocLink = ({ href, children, isExternal = false }: DocLinkProps) => {
4747
data-group
4848
>
4949
<Flex align="center">
50-
<Emoji fontSize="md" me={4} text=":page_with_curl:" />
50+
<Emoji className="me-4 text-md" text=":page_with_curl:" />
5151
</Flex>
5252
<Box flex={1} flexDirection="column">
5353
<LinkOverlay

src/components/DocsNav.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Emoji from "@/components/Emoji"
1616
import { BaseLink } from "@/components/Link"
1717
import Text from "@/components/OldText"
1818

19+
import { cn } from "@/lib/utils/cn"
1920
import { trackCustomEvent } from "@/lib/utils/matomo"
2021

2122
import docLinks from "@/data/developer-docs-links.yaml"
@@ -50,7 +51,7 @@ type CardLinkProps = {
5051

5152
const CardLink = ({ docData, isPrev, contentNotTranslated }: CardLinkProps) => {
5253
const { t } = useTranslation("page-developers-docs")
53-
const { flipForRtl } = useRtlFlip()
54+
const { isRtl } = useRtlFlip()
5455

5556
const xPadding = isPrev ? { ps: "0" } : { pe: 0 }
5657

@@ -70,8 +71,10 @@ const CardLink = ({ docData, isPrev, contentNotTranslated }: CardLinkProps) => {
7071
<Box textDecoration="none" p={4} h="100%" order={isPrev ? 0 : 1}>
7172
<Emoji
7273
text={isPrev ? ":point_left:" : ":point_right:"}
73-
fontSize="5xl"
74-
transform={contentNotTranslated ? undefined : flipForRtl}
74+
className={cn(
75+
"text-5xl",
76+
!contentNotTranslated && isRtl ? "-scale-x-100" : ""
77+
)}
7578
/>
7679
</Box>
7780
<TextDiv {...xPadding} {...(!isPrev && { textAlign: "end" })}>

src/components/EventCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ const EventCard = ({
8282
>
8383
<Text color="primary.base" marginBottom={0} textAlign="end">
8484
{date}
85-
<Emoji text=":spiral_calendar:" fontSize="md" ms={2} />
85+
<Emoji text=":spiral_calendar:" className="ms-2 text-md" />
8686
</Text>
8787
<Text marginBottom={0} textAlign="end">
8888
<Text as="span" opacity={0.6}>
8989
{location}
9090
</Text>
91-
<Emoji text=":round_pushpin:" fontSize="md" ms={2} />
91+
<Emoji text=":round_pushpin:" className="ms-2 text-md" />
9292
</Text>
9393
<Heading as="h3" marginTop={0} fontWeight="semibold" lineHeight={1.4}>
9494
{title}

0 commit comments

Comments
 (0)