react-confirm-bootstrap

5.3.1 • Public • Published

react-confirm-bootstrap

Confirm Dialog for react with Bootstrap Modal.

Example

Example

    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>
            )
        },
    });

Props

body: React.PropTypes.any.isRequired

Body text for the modal.

buttonText: React.PropTypes.node

Options text for the initial button. Is only used if children are not passed.

cancelText: React.PropTypes.node

Text for the cancel button in the modal.

confirmBSStyle: React.PropTypes.string

Bootstrap style.
Options: 'primary', 'success', 'info', 'warning', 'danger', 'link'.
Default: 'danger'

confirmText: React.PropTypes.node

Text for the confirm button in the modal.

onClose: React.PropTypes.func

Function to be called once closed.

onConfirm: React.PropTypes.func.isRequired

Function to be called once confirmed.

title: React.PropTypes.node.isRequired

Title text for the modal

visible: React.PropTypes.bool

Optional initial state if the modal should start open.

children: React.PropTypes.any

Node to listen to clicks for. react-confirm-bootstrap render a react-bootstrap button by default.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.3.1259latest

Version History

VersionDownloads (Last 7 Days)Published
5.3.1259
5.3.0310
5.2.12
5.2.00
5.1.12
5.1.00
5.0.10
5.0.00
4.0.01
3.1.4198
3.1.30
3.1.223
3.1.11
3.1.00
3.0.00
2.2.10
2.2.00
2.1.20
2.1.10
2.1.00
2.0.00
1.0.30
1.0.20
1.0.10
1.0.00
0.0.20
0.0.10

Package Sidebar

Install

npm i react-confirm-bootstrap

Weekly Downloads

796

Version

5.3.1

License

MIT

Unpacked Size

55.4 kB

Total Files

12

Last publish

Collaborators

  • gregthebusker