bisu-react-modal

1.0.14 • Public • Published

bisu-react-modal

Travis npm package Coveralls

Org usage for react-modal.

Installation

npm install --save bisu-react-modal
then include this scss file to your main scss @import '~bisu-react-modal/lib/style.scss';

Usage

import React, { Component } from 'react'
import Modal from 'bisu-react-modal'
 
class ShowModal extends Component {
 
  constructor(props) {
    super(props)
    this.state = {
      showModal: false,
    }
  }
 
  render() {
    const { showModal } = this.state
 
    return (
      <div>
        <button type="button" onClick={() => this.setState({ showModal: true })}>Show Modal</button>
        <Modal handleClose={() => this.setState({ showModal: false })} isOpen={showModal}>
          Modal Content
        </Modal>
      </div>
    )
  }
}
 

Readme

Keywords

Package Sidebar

Install

npm i bisu-react-modal

Weekly Downloads

0

Version

1.0.14

License

MIT

Last publish

Collaborators

  • mewben