Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 27 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { RefObject } from 'react' |
||
|
|||
2 | |||
3 | import styles from './YoutubeVideo.module.scss' |
||
4 | |||
5 | interface IYoutubeVideo { |
||
6 | embedId: string |
||
7 | title: string |
||
8 | } |
||
9 | |||
10 | const YoutubeVideo = ({ embedId, title = 'Youtube video' }: IYoutubeVideo) => ( |
||
11 | <div style={{ width: '100%' }}> |
||
12 | <div className={styles.responsiveVideo}> |
||
13 | <iframe |
||
14 | width="853" |
||
15 | height="480" |
||
16 | src={`https://www.youtube.com/embed/${embedId}`} |
||
17 | frameBorder="0" |
||
18 | allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" |
||
19 | allowFullScreen |
||
20 | title={title} |
||
21 | /> |
||
22 | </div> |
||
23 | </div> |
||
24 | ) |
||
25 | |||
26 | export { YoutubeVideo } |
||
27 |