File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -112,4 +112,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
112
112
113
113
### Added
114
114
115
- - Added Google Analytics 4 Integration
115
+ - Added Google Analytics 4 Integration
116
+
117
+ ### Added
118
+
119
+ - Added Embeded Youtube videos
Original file line number Diff line number Diff line change
1
+ import S from './styles' ;
2
+
3
+ const YoutubeEmbed = ( { id } ) => {
4
+ const url = `https://www.youtube.com/embed/${ id } ` ;
5
+
6
+ return (
7
+ < S . YoutubeContainer >
8
+ < S . YoutubeIframe src = { url } allowfullscreen />
9
+ </ S . YoutubeContainer >
10
+ ) ;
11
+ } ;
12
+
13
+ export default YoutubeEmbed ;
Original file line number Diff line number Diff line change
1
+ import styled from 'styled-components'
2
+
3
+ const YoutubeContainer = styled . div `
4
+ position: relative;
5
+ padding-bottom: 56.25%;
6
+ height: 0;
7
+ overflow: hidden;
8
+ max-width: 100%;
9
+ ` ;
10
+
11
+ const YoutubeIframe = styled . iframe `
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ width: 100%;
16
+ height: 100%;
17
+
18
+
19
+ ` ;
20
+
21
+ export default { YoutubeContainer, YoutubeIframe } ;
You can’t perform that action at this time.
0 commit comments