mehdizi-react-modal
v1.0.2
Published
A component to handle modal
Downloads
7
Readme
TypeScript Components by Rupert
This repository was created as part of a guide to publishing TypeScript React components. You can read the guide over here: Publishing TypeScript React components to NPM
Getting Started
Install this package:
npm add my-react-modal-by-mehdizi
Import the Modal component:
import { Modal } from "my-react-modal-by-mehdizi";
import { useModal } from "my-react-modal-by-mehdizi";
import the variable and the function to handle the modal into your component. const { isOpen, handleToggleModal } = useModal();
You can then render the Modal
component like any other React component in JSX.
with the message props of your choice :