react-smoothie-modal
v1.0.7
Published
react smoothie modal component 🦄
Downloads
2
Maintainers
Readme
react-smoothie-modal
react smoothie modal component 🦄
Install
npm install --save react-smoothie-modal
Usage
import React, { Component } from "react";
import SmoothieModal from "react-smoothie-modal";
class Example extends Component {
state = {
modalShow: false
}
closeModal = () => {
this.setState({ modalShow: false})
}
render() {
return (
<div style={{ margin: '30px'}}>
<button onClick={() => this.setState({ modalShow: true})} className="button">Open Modal</button>
<SmoothieModal isShow={this.state.modalShow} handleClose={() => this.setState({ modalShow: false })} smallModal Backdrop>
<div style={{ marginTop: '50px', textAlign: 'center'}}>Smoothie Modal 🦄🦄</div>
</SmoothieModal>
</div>
);
}}
}
License
MIT © enesfurkangenc