Confirm Dialog for react with Bootstrap Modal.
var Confirm = require('react-confirm-bootstrap');
var ConfirmAction = React.createClass({
onConfirm() {
// Preform your action.
},
render() {
return (
<Confirm
onConfirm={this.onConfirm}
body="Are you sure you want to delete this?"
confirmText="Confirm Delete"
title="Deleting Stuff">
<button>Delete Stuff</button>
</Confirm>
)
},
});
Body text for the modal.
Options text for the initial button. Is only used if children are not passed.
Text for the cancel button in the modal.
Bootstrap style.
Options: 'primary', 'success', 'info', 'warning', 'danger', 'link'.
Default: 'danger'
Text for the confirm button in the modal.
Function to be called once closed.
Function to be called once confirmed.
Title text for the modal
Optional initial state if the modal should start open.
Node to listen to clicks for. react-confirm-bootstrap
render a react-bootstrap
button by default.