Skip to content

Commit 8018b81

Browse files
authored
Merge pull request #7723 from ethereum/migrateYouTubeToChakra
Refactor YouTube component to use ChakraUI
2 parents 519a5b2 + 969505a commit 8018b81

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/components/YouTube.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import React from "react"
2-
import styled from "@emotion/styled"
3-
4-
const Figure = styled.figure`
5-
display: block;
6-
margin: 1rem 0;
7-
`
2+
import { Box } from "@chakra-ui/react"
83

94
/**
105
* @param {id} ID of the YouTube video
@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
2722
const baseUrl = "https://www.youtube.com/embed/"
2823
const src = baseUrl + id + startQuery
2924
return (
30-
<Figure>
25+
<Box as="figure" display="block" my={4}>
3126
<iframe
3227
width="100%"
3328
height="315"
@@ -43,7 +38,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
4338
picture-in-picture"
4439
allowFullScreen
4540
></iframe>
46-
</Figure>
41+
</Box>
4742
)
4843
}
4944

0 commit comments

Comments
 (0)