bs4-modal-react
See the storybook demos here
Install
npm install bs4-modal-react
npm install bootstrap@4.0.0-beta
Usage
Make sure you include the Boostrap 4 CSS as that is not included in this package.
import React Component from "react";import "bootstrap/dist/css/bootstrap.css"; import Modal ModalHeader ModalTitle ModalBody ModalFooter from "bs4-modal-react"; state = visible: false ; this; this; { ; this; }; { const visible = thisstate; return <div> <button ="button" ="btn btn-primary" => Launch modal </button> <Modal = => <ModalHeader> <ModalTitle>Modal title</ModalTitle> </ModalHeader> <ModalBody>Woohoo reading this text in a modal!</ModalBody> <ModalFooter> <button ="button" ="btn btn-secondary" => Close </button> <button ="button" ="btn btn-primary" => Save changes </button> </ModalFooter> </Modal> </div> ; }