This package has been deprecated

    Author message:

    Please switch to react-confirm-bootstrap

    cth-react-confirm-bootstrap

    0.0.2 • 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.

    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.

    Install

    npm i cth-react-confirm-bootstrap

    DownloadsWeekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • eirikbirkeland