content: import React from 'react';
  import { storiesOf } from '@storybook/react';
  import { createModal } from '../src';
  import '../src/Renderer/Renderer.scss';
  
  storiesOf('Modal', module)
    .add('default renderer', () => {
      const SimpleModal = () => (
        <div style={{ padding: '30px' }}>
          <h1>Hi!</h1>
          <p>I am modal.</p>
        </div>
      );
      const Modal = createModal({
        'simple-modal': SimpleModal
      });
  
      class ModalStateContainer extends React.Component {
        constructor() {
          super();
          this.toggleModal = this.toggleModal.bind(this);
          this.state = {
            component: ''
          };
        }
  
        toggleModal() {
          this.setState({
            component: this.state.component ? '' : 'simple-modal'
          });
        }
  
        render() {
          return (
            <div>
              <button onClick={this.toggleModal}>Open modal</button>
              <Modal component={this.state.component} onOverlayClick={this.toggleModal} />
            </div>
          );
        }
      }
  
      return <ModalStateContainer />;
    });
  