Skip to content

Conversation

douglasmakey
Copy link
Contributor

@douglasmakey douglasmakey commented Oct 29, 2022

Description

Migrate GhostCard from emotion to chakra-ui.

Related Issue

#6374

@gatsby-cloud
Copy link

gatsby-cloud bot commented Oct 30, 2022

✅ ethereum-org-website-dev deploy preview ready

Comment on lines +19 to +21
borderRadius="2px"
height="full"
width="full"
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer Oct 31, 2022

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)! 😅

Copy link
Member

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

Copy link
Contributor

@TylerAPfledderer TylerAPfledderer left a 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. 😄

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.

Nicely done @douglasmakey thanks for the PR.

left="2"
border="1px solid"
borderColor="border"
borderRadius="2px"
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
borderRadius="2px"
borderRadius="sm"

Comment on lines +19 to +21
borderRadius="2px"
height="full"
width="full"
Copy link
Member

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

@pettinarip pettinarip merged commit 3fbd6a7 into ethereum:dev Nov 4, 2022
@gitpoap-bot
Copy link

gitpoap-bot bot commented Nov 4, 2022

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Ethereum.org Contributor:

GitPOAP: 2022 Ethereum.org Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@pettinarip
Copy link
Member

@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 🥳!

@pettinarip
Copy link
Member

@all-contributors please add @douglasmakey for code

@allcontributors
Copy link
Contributor

@pettinarip

I've put up a pull request to add @douglasmakey! 🎉

@pettinarip pettinarip mentioned this pull request Nov 4, 2022
80 tasks
@wackerow wackerow mentioned this pull request Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants