From 7f1479f24377b3485107419ae0f85a925c82e054 Mon Sep 17 00:00:00 2001
From: Corwin Smith
Date: Tue, 14 Jan 2025 22:26:56 -0700
Subject: [PATCH] feat: migrate Card to tailwind
---
src/components/Card/index.tsx | 50 +++++++++++++++++--------------
src/components/Trilemma/index.tsx | 4 +--
src/layouts/md/Translatathon.tsx | 3 +-
src/pages/bug-bounty.tsx | 4 +--
src/pages/community.tsx | 6 +---
src/pages/dapps.tsx | 2 +-
src/pages/developers/index.tsx | 14 +--------
src/pages/eth.tsx | 6 +---
src/pages/gas.tsx | 5 +---
src/pages/learn.tsx | 13 ++------
src/pages/roadmap/vision.tsx | 8 +----
src/pages/staking/index.tsx | 8 +----
src/pages/wallets/index.tsx | 6 +---
src/pages/what-is-ethereum.tsx | 5 +---
src/styles/semantic-tokens.css | 6 ++++
tailwind.config.ts | 2 ++
16 files changed, 51 insertions(+), 91 deletions(-)
diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx
index 27be3528caa..c1b7e914e14 100644
--- a/src/components/Card/index.tsx
+++ b/src/components/Card/index.tsx
@@ -1,40 +1,44 @@
import { ReactNode } from "react"
-import { Heading, Stack, StackProps, Text } from "@chakra-ui/react"
import Emoji from "@/components/Emoji"
-export type CardProps = Omit & {
+import { cn } from "@/lib/utils/cn"
+
+export type CardProps = {
children?: ReactNode
emoji?: string
title?: ReactNode
description?: ReactNode
+ className?: string
}
-const Card = ({ emoji, title, description, children, ...props }: CardProps) => (
- (
+
-
+
{emoji &&
}
-
- {title && (
-
- {title}
-
- )}
- {description && {description}}
-
-
+
+ {title &&
{title}
}
+ {description &&
{description}
}
+
+
{children}
-
+
)
export default Card
diff --git a/src/components/Trilemma/index.tsx b/src/components/Trilemma/index.tsx
index 011519bf985..af0602b3a4c 100644
--- a/src/components/Trilemma/index.tsx
+++ b/src/components/Trilemma/index.tsx
@@ -35,11 +35,11 @@ const Trilemma = () => {
{t("page-roadmap-vision-trilemma-modal-tip")}:
-
+
-
+
Close