a simple modal component for react
npm install --save react-just-modal
import React, { Component } from 'react'
import Modal from 'react-just-modal'
class Example extends Component {
render() {
return (
<Modal visible={true} onCloseOutsideClick={true}>
<div>Simple modal</div>
</Modal>
)
}
}
Prop | Type | Description |
---|---|---|
visible |
boolean |
to open or close modal |
onCloseOutsideClick |
boolean |
to open or close modal when outside click |
onClose |
function |
callback to close modal |
className |
string |
style |
MIT © Btechiexyz