0.3.0 • Published 2 years ago

react-powerfool-modal v0.3.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

React Powerfool Modal

Package for a React modal.

Table of Contents

  1. Installation
  2. Example

Installation

To install, you can use npm:

$ npm install --save react-powerfool-modal

Example

import React, { useState } from "react";
import { Modal } from "react-powerfool-modal";

function App() {
  const [show, setShow] = useState(false);

  return (
    <div>
      <button onClick={() => setShow(true)}>Open the modal</button>
      <Modal
        show={show}
        onClose={() => setShow(false)}
        message="The modal is open ! If you want you can close it with the button"
      />
    </div>
  );
}

export default App;