1.0.1 • Published 8 years ago

@ieremeev/modal v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

@ieremeev/modal

@ieremeev/modal provides your with Semantic UI modal window

Installation

Run this command:

npm install cccisd-loader --save

Usage

var Modal = require('@ieremeev/modal');

var MyComponent = React.createClass({
    render() {
        return (
            <Modal
                trigger={<button>Open</button>}
                title="Cool modal window"
            >
                <div>Some modal content</div>
            </Modal>
        );
    },
});

Props

  • trigger - (type: node, default: "") Any React component which will be the trigger for this modal After clicking on this trigger the modal will show up For example: Open Modal

  • title - (type: string, default: "") Header title

  • size - (type: string, default: "normal") Width of the modal window. Can be 'small', 'normal' and 'large' Also you can use css-width, for example "700px", "90%" etc.

  • modalWrapperClass - (type: string, default: "") Class for modal wrapper

  • beforeShow - (type: function, default: null) Some function which will be run before modal shows up. It can return Promise. In this case modal will wait for promise to be resolved. It will show spinning image during waiting.

  • options - (type: object, default: {}) Look at http://getbootstrap.com/javascript/#modals-options