react-smoothie-modal

1.0.7 • Public • Published

react-smoothie-modal

react smoothie modal component 🦄

NPM JavaScript Style Guide

Documentation

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

Package Sidebar

Install

npm i react-smoothie-modal

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

37.7 kB

Total Files

6

Last publish

Collaborators

  • enesfurkangenc