-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Migrate ActionCard.tsx to tailwind #14244
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yun-chiao thanks for the PR. Left a reply about useColorModeValue
. LMK what do you think
Hi @pettinarip , I've updated this PR, and here’s some information about the issue with DescriptionI found an example that has been merged and is using DebuggingIf I add the following to if (resolvedTheme == null) {
return "null_theme";
} I then get Thank you! AttachmentSnapshoot for |
Description
ActionCard
insideCentralActionCard
ineth.tsx
with aBox
to ensure parameters likesx
are correctly passed down.className
to Tailwind CSS.@chakra-ui/react
.Note
I did not replace
useColorModeValue
with theuseColorModeValue
from@/hooks/useColorModeValue
because I encountered some strange issues.For example:
When using descriptionColor as a className:
On the first render, it always gets
"darkmode"
in className, but when Iconsole.log(descriptionColor)
, it consistently returns"lightmode"
from the first print.After doing some debugging inside
@/hooks/useColorModeValue
, I suspect it is related to thetheme
beingnull
on the initial render, which causes the conditional check to fail and return"darkmode"
. However, I am unsure whyconsole.log(descriptionColor)
which would be "lightmode" and the actualdescriptionColor
applied to the CSS behave inconsistently.Snapshoot
localhost
https://ethereum.org/
Related Issue
#13946