1.2.2 • Published 7 years ago

@factorbi/component-modal v1.2.2

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
7 years ago

React component

Class example React to use:

import Modal from '@factorbi/component-modal';

export default class Component extends React.Component {

    constructor(props) {
        this.state = {
            openModal: false
        };
        this.modalToggle = this.modalToggle.bind(this);
    }

    modalToggle() {
        this.setState({
            openModal: !this.state.openModal
        });
    }

    render() {
        return (
            <Modal id="CustomId" name="custom-name" open={ this.state.openModal } close={ this.modalToggle }>
                {/*Must have content here */}
                <h1>Header</h1>
               <AnotherComponent />
            </Modal>
        );
    }
}
1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago