1.0.14 • Published 7 years ago
bisu-react-modal v1.0.14
bisu-react-modal
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>
)
}
}