Skip to content

Instantly share code, notes, and snippets.

@r3nya r3nya/Fullscreen.js
Created Feb 1, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.