0.2.7 • Published 3 years ago

react-modal-popup v0.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-modal-popup

Installation:

npm install --save react-modal-popup

or

yarn add react-modal-popup

Usage :

Add ModalPopup to your component:

import React, { useState } from 'react';
import ModalPopup from 'react-modal-popup';

const MyApp = () => {
  const [isOpen, setIsOpen] = useState(false);

  const handleShowModal = () => setIsOpen(!isOpen);

  return (
    <div>
      <button onClick={ handleShowModal }>Open Modal</button>
      <ModalPopup
        isOpen={ isOpen }
        onCloseModal={ handleShowModal }
      >
        <h1>Modal</h1>
      </ModalPopup>
    </div>
  );
};
0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago