Last active
February 1, 2019 19:59
-
-
Save productioncoder/a330b2d5f01e188856903ea548769098 to your computer and use it in GitHub Desktop.
Watch component using Grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './Watch.scss'; | |
import {RelatedVideos} from '../../components/RelatedVideos/RelatedVideos'; | |
import {Video} from '../../components/Video/Video'; | |
export class Watch extends React.Component { | |
render() { | |
return ( | |
<div className='watch-grid'> | |
<Video className='video' id='-7fuHEEmEjs' /> | |
<div className='metadata' style={{width: '100%', height: '100px', background: '#F91112'}}>Metadata</div> | |
<div className='video-info-box' style={{width: '100%', height: '100px', background: '#BD10E0'}}>Video Info box</div> | |
<div className='comments' style={{width: '100%', height: '100px', background: '#9013FE'}}>comments</div> | |
<RelatedVideos className='relatedVideos'/> | |
</div> | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.watch-grid { | |
display: grid; | |
grid-template: auto auto auto 1fr / auto 402px; | |
.video { | |
grid-column: 1 / 2; | |
grid-row: 1 / 2 | |
} | |
.metadata { | |
grid-column: 1 / 2; | |
grid-row: 2 / 3 | |
} | |
.video-info-box { | |
grid-column: 1 / 2; | |
grid-row: 3 / 4; | |
} | |
.comments { | |
grid-column: 1 / 2; | |
grid-row: 4 / 5 | |
} | |
.related-videos { | |
grid-column: 2 / 3; | |
grid-row: 1 / span 4; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment