import {Modal} from 'reactjs-components';
import React from 'react';

import Util from '../../utils/Util';

class FullScreenModal extends React.Component {
  render() {
    let {props} = this;

    return (
      <Modal geminiClass="gm-scrollbar-container-flex"
        modalHeight="100%"
        modalClass="modal modal-full-screen"
        showHeader={true}
        showFooter={false}
        transitionNameModal="modal-full-screen"
        {...Util.omit(props, Object.keys(FullScreenModal.propTypes))}>
        {props.children}
      </Modal>
    );
  }
}

FullScreenModal.propTypes = {
  children: React.PropTypes.node
};

module.exports = FullScreenModal;

import classNames from 'classnames';
import {Modal} from 'reactjs-components';
import React from 'react';

import Util from '../../utils/Util';

class FullScreenModal extends React.Component {
  render() {
    const {props} = this;
    const geminiClasses = classNames({
      'gm-scrollbar-container-flex': props.useGemini !== false
    });

    let modalHeight = null;

    if (props.useGemini) {
      modalHeight = '100%';
    }

    return (
      <Modal geminiClass={geminiClasses}
        modalClass="modal modal-full-screen"
        modalHeight={modalHeight}
        showHeader={true}
        showFooter={false}
        transitionNameModal="modal-full-screen"
        {...Util.omit(props, ['children'])}>
        {props.children}
      </Modal>
    );
  }
}

FullScreenModal.defaultProps = {
  useGemini: true
};

FullScreenModal.propTypes = {
  children: React.PropTypes.node,
  useGemini: React.PropTypes.bool
};

module.exports = FullScreenModal;

Allow disabling Gemini in FullScreenModal