0.1.4 • Published 5 months ago

mik-modal v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

mik-modal

installation

npm install mik-modal

Usage

import { useState } from "react";
import Modal from "mik-modal/dist/Modal";

function Example() {
  const [open, setIsOpen] = useState(false);

  const openModal = () => {
    setIsOpen(true);
  };

  const closeModal = () => {
    setIsOpen(false);
  };

  return (
    <div>
      <h1>Hello Modal</h1>
      <Modal title="Hello world" isOpened={open} closeModal={closeModal} />
      <button onClick={openModal}>Open Modal</button>
    </div>
  );
}
0.1.2

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.1

6 months ago

0.1.0

10 months ago