Skip to content

Commit

Permalink
Merge pull request #34 from lion-packages/youtube-component
Browse files Browse the repository at this point in the history
Properties have been added for iframe component
  • Loading branch information
GabrielPalac authored Sep 15, 2024
2 parents 43ba092 + a0f6637 commit b220823
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/pages/components/YoutubeVideo.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { Fragment } from "react";
import { Ratio } from "react-bootstrap";

export default function YoutubeVideo({ title, url, ratio = "16x9" }) {
return (
<div
className={
"border border-secondary rounded p-2 mb-3 ratio ratio-" + ratio
}
<Ratio
aspectRatio={ratio}
className="border border-secondary rounded p-2 mb-3"
>
<iframe
src={url}
title={title}
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
/>
</div>
</Ratio>
);
}

0 comments on commit b220823

Please sign in to comment.