Created
February 1, 2016 22:43
-
-
Save r3nya/30ac16323f9c78642616 to your computer and use it in GitHub Desktop.
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, { PropTypes, Component, cloneElement, Children } from 'react'; | |
import classNames from 'classnames'; | |
import styles from './Fullscreen.scss'; | |
export default class Fullscreen extends Component { | |
static propTypes = { | |
children: PropTypes.node, | |
scroll: PropTypes.boolean | |
}; | |
render() { | |
const { children, scroll } = this.props; | |
return ( | |
<div className={classNames(styles.main, {styles.scroll: scroll})}> | |
{children} | |
</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
.main { | |
position: fixed; | |
z-index: 100; | |
width: 100%; | |
height: 100%; | |
} | |
.scroll { | |
overflow-y: true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment