Skip to content

Commit 77c4f5e

Browse files
committed
feat: migrate AssetDownloadArtist to tailwind
1 parent 7539def commit 77c4f5e

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

src/components/AssetDownload/AssetDownloadArtist.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { useTranslation } from "next-i18next"
2-
import { Flex } from "@chakra-ui/react"
32

43
import Emoji from "@/components/Emoji"
5-
import Link from "@/components/Link"
6-
import Text from "@/components/OldText"
4+
5+
import { cn } from "@/lib/utils/cn"
6+
7+
import { Flex } from "../ui/flex"
8+
import { BaseLink } from "../ui/Link"
79

810
type AssetDownloadArtistProps = {
911
artistName: string
@@ -17,20 +19,17 @@ const AssetDownloadArtist = ({
1719
const { t } = useTranslation("page-assets")
1820
return (
1921
<Flex
20-
mb="4"
21-
border="1px"
22-
borderTop="none"
23-
borderColor="white700"
24-
py="2"
25-
px="4"
26-
borderRadius="0 0 4px 4px"
22+
className={cn(
23+
"mb-4 border border-t-0 border-[#e5e5e5]",
24+
"rounded-b-[4px] px-4 py-2"
25+
)}
2726
>
28-
<Flex me="2" fontSize="md" textColor="text300">
27+
<Flex className="me-2 text-md text-text-300">
2928
<Emoji text=":artist_palette:" className="me-2 text-2xl" />
3029
{t("page-assets-download-artist")}
3130
</Flex>
32-
{artistUrl && <Link href={artistUrl}>{artistName}</Link>}
33-
{!artistUrl && <Text m="0">{artistName}</Text>}
31+
{artistUrl && <BaseLink href={artistUrl}>{artistName}</BaseLink>}
32+
{!artistUrl && <p>{artistName}</p>}
3433
</Flex>
3534
)
3635
}

src/styles/global.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
rgba(145, 234, 228, 0.2) 100%
4444
);
4545
--search-background: var(--background);
46+
--text-300: #4c4c4c;
4647
}
4748

4849
[data-theme="dark"] {
@@ -71,6 +72,7 @@
7172
rgba(134, 253, 232, 0.08) 100%
7273
);
7374
--search-background: #4c4c4c;
75+
--text-300: #cccccc;
7476
}
7577
}
7678

tailwind.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ const config = {
202202
"tooltip-shadow": "var(--tooltip-shadow)",
203203
"hub-hero-content": "var(--hub-hero-content)",
204204
"search-background": "var(--search-background)",
205+
"text-300": "var(--text-300)",
205206
},
206207

207208
backgroundImage: {

0 commit comments

Comments
 (0)