Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate HorizontalCard to tailwind #14226

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kushagrasarathe
Copy link
Contributor

Migrates HorizontalCard component to tailwind from Chakra

Description

This PR updates the HorizontalCard to use tailwindcss instead of Chakra ui. Styles have been updated for both light and dark version.

Related Issue

#13946

Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 2a821d3
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/671a0f1cacd4d50008db3684
😎 Deploy Preview https://deploy-preview-14226--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 47 (🔴 down 6 from production)
Accessibility: 93 (no change from production)
Best Practices: 89 (🔴 down 9 from production)
SEO: 99 (🟢 up 7 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@isabelladebrito isabelladebrito added the hacktoberfest Track hacktoberfest activity label Oct 24, 2024
@kushagrasarathe kushagrasarathe mentioned this pull request Oct 25, 2024
65 tasks
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kushagrasarathe looking good, left a few comments.

Comment on lines +29 to +30
<div className="text-lg">{title}</div>
<div className="text-base">{description}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could still use p tags here to keep the semantics

Suggested change
<div className="text-lg">{title}</div>
<div className="text-base">{description}</div>
<p className="text-lg">{title}</p>
<p className="text-base">{description}</p>

@@ -303,8 +303,8 @@ const GasPage = () => {
key={benefit.emoji}
emoji={benefit.emoji}
description={benefit.description}
className="text-5xl"
align="center"
emojiClassName="text-5xl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5xl is the default size applied in HorizontalCard. We can remove, its just redundant.

Suggested change
emojiClassName="text-5xl"

@@ -458,7 +458,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
<HorizontalCard
emoji={token.emoji}
description={token.description}
className="text-5xl"
emojiClassName="text-5xl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
emojiClassName="text-5xl"

className="text-[2.5rem]"
alignItems="center"
className="my-0.5 w-[100%] items-center"
emojiClassName={"text-[2.5rem]"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
emojiClassName={"text-[2.5rem]"}
emojiClassName="text-[2.5rem]"

@@ -212,7 +212,7 @@ const CardContainer = (props: FlexProps) => (
)

const TokenCard = (props: ComponentProps<typeof HorizontalCard>) => (
<HorizontalCard minW="full" my={2} mx={0} borderRadius={0} {...props} />
<HorizontalCard {...props} className="mx-0 my-2 min-w-full rounded-none" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use the cn function here to merge the classNames. Otherwise, we will always override the className passed to TokenCard.

Suggested change
<HorizontalCard {...props} className="mx-0 my-2 min-w-full rounded-none" />
<HorizontalCard className={cn("mx-0 my-2 min-w-full rounded-none", className)} {...props} />

className="text-5xl"
align="center"
emojiClassName="text-5xl"
className="flex items-center py-2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
className="flex items-center py-2"
className="flex items-center"

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kushagrasarathe looking good, left a few comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Track hacktoberfest activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants