-
Notifications
You must be signed in to change notification settings - Fork 5.2k
refactor: Migrate GhostCard from emotion to chakra-ui. #8413
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
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
borderRadius="2px" | ||
height="full" | ||
width="full" |
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.
Two things can be improved with these three props.
Since they are used in both child components, maybe they should be in a reusable object and spread into each component?
Secondly, since both the height
and width
props in both instances have the same value (full
), you can use the boxSize
prop instead!
So in total...
// Imported Type signature from Chakra totally optional, but great to help with the intellisense! :D
import { type BoxProps } from '@chakra-ui/react'
const baseCardStyles: BoxProps = {
boxSize: "full",
borderRadius: "2px"
}
return (
// ... //
<Box
{...baseStyles}
// ... //
Purely semantics here, but I see this as a cleaner way to go (and utilizing a Chakra-specific prop)! 😅
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.
Didn't know about boxSize
👍🏼 TIL
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.
Hey @douglasmakey! Good work! Thought I leave a comment with a possible change. 😄
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.
Nicely done @douglasmakey thanks for the PR.
left="2" | ||
border="1px solid" | ||
borderColor="border" | ||
borderRadius="2px" |
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.
borderRadius="2px" | |
borderRadius="sm" |
borderRadius="2px" | ||
height="full" | ||
width="full" |
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.
Didn't know about boxSize
👍🏼 TIL
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2022 Ethereum.org Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
@douglasmakey be sure to join the discord if you are interested in contributing further to the project or have any questions for the team. And we've just released our 2022 POAPs so remember to claim yours also 🥳! |
@all-contributors please add @douglasmakey for code |
I've put up a pull request to add @douglasmakey! 🎉 |
Description
Migrate GhostCard from emotion to chakra-ui.
Related Issue
#6374