Skip to content

Instantly share code, notes, and snippets.

@r3nya
Created February 1, 2016 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r3nya/30ac16323f9c78642616 to your computer and use it in GitHub Desktop.
Save r3nya/30ac16323f9c78642616 to your computer and use it in GitHub Desktop.
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>
);
}
}
.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