Scaffold basic workshop frontend.
This commit is contained in:
22
components/YoutubeEmbed.js
Normal file
22
components/YoutubeEmbed.js
Normal file
@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
const YoutubeEmbed = ({ embedId }) => (
|
||||
<div className="video-responsive">
|
||||
<iframe
|
||||
width="853"
|
||||
height="480"
|
||||
src={`https://www.youtube.com/embed/${embedId}`}
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
title="Embedded youtube"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
YoutubeEmbed.propTypes = {
|
||||
embedId: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
export default YoutubeEmbed;
|
||||
Reference in New Issue
Block a user