react-custom-modal
This component supports showing any custom modal dialog.
It is possible to display by method call.
Install
npm install react-custom-modal
Usage
import React Component from 'react'import 'react-custom-modal/dist/index.css'import Modal from 'react-custom-modal' { thisdialog = React thisshowDialog = thisshowDialog } { thisdialogcurrent } { return <div> <button ='btn' => Show Dialog </button> <Modal ='Custom' ='CustomDialog' =/> </div> } { const close = thisprops return <div> <div ='modal-header'> <span ='title'>Modal title</span> <button ='close-btn' => <span>×</span> </button> </div> <div ='modal-body'> <p>Modal body text goes here</p> </div> <div ='modal-footer'> <button ='btn' =>Cancel</button> <button ='btn' =>Save</button> </div> </div> }
License
MIT © sk39