Skip to content

Commit 09aad4c

Browse files
chore(YouTube): match with dev branch to prevent regression
1 parent dd0f766 commit 09aad4c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/YouTube.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { Box } from "@chakra-ui/react"
2+
import { AspectRatio } from "@chakra-ui/react"
33

44
/**
55
* @param {id} ID of the YouTube video
@@ -22,10 +22,8 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
2222
const baseUrl = "https://www.youtube.com/embed/"
2323
const src = baseUrl + id + startQuery
2424
return (
25-
<Box as="figure" display="block" my={4}>
25+
<AspectRatio as="figure" maxW="560px" ratio={16 / 9} my={8}>
2626
<iframe
27-
width="100%"
28-
height="315"
2927
src={src}
3028
frameBorder="0"
3129
title={title}
@@ -37,8 +35,8 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
3735
gyroscope;
3836
picture-in-picture"
3937
allowFullScreen
40-
></iframe>
41-
</Box>
38+
/>
39+
</AspectRatio>
4240
)
4341
}
4442

0 commit comments

Comments
 (0)