-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Refactor YouTube component to use ChakraUI #7723
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => { | |||
const baseUrl = "https://www.youtube.com/embed/" | |||
const src = baseUrl + id + startQuery | |||
return ( | |||
<Figure> | |||
<Box as="figure" display="block" marginY="1rem"> | |||
<iframe |
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.
I don't think we'd want to refactor the iframe to Chakra. LMK if you disagree
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.
No, thats ok 👍🏼
src/components/YouTube.tsx
Outdated
@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => { | |||
const baseUrl = "https://www.youtube.com/embed/" | |||
const src = baseUrl + id + startQuery | |||
return ( | |||
<Figure> | |||
<Box as="figure" display="block" marginY="1rem"> |
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.
Keeping display block is necessary for Crowdin formatting reasons.
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.
Oh didn't know that, thanks for explaining that. You can ignore my suggestion there then 😬
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.
Good first Chakra PR @minimalsm 🚀 I've pointed out only a few improvements.
src/components/YouTube.tsx
Outdated
@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => { | |||
const baseUrl = "https://www.youtube.com/embed/" | |||
const src = baseUrl + id + startQuery | |||
return ( | |||
<Figure> | |||
<Box as="figure" display="block" marginY="1rem"> |
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.
<Box as="figure" display="block" marginY="1rem"> | |
<Box as="figure" display="block" my={4}> |
figure
is by defaultblock
displayed, we can ignore it- there is a short version of
marginY
=>my
- lets try to use the chakra spacing scale. 1 rem = 4 (more about this here)
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.
Fixed 👍
Thanks for the link! I looked in our theme and couldn't see spacing. Can I assume we'll be sticking with the default Chakra spacing?
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.
Yes, we are going to use the default values. In the Design System too.
Co-authored-by: Pablo Pettinari <[email protected]>
Gatsby Cloud Build Reportethereum-org-website-dev 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 17m |
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.
🚀
Description
Migrate YouTube from styled-components to ChakraUI
Related Issue
#6374