0.1.8 • Published 2 years ago

@oliviag-dev/simple-npm-modal-react v0.1.8

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

React_modal_components

This project is Modal components for React. It is used to validate a form

https://www.npmjs.com/package/@oliviag-dev/simple-npm-modal-react

Install

npm install --save @oliviag-dev/simple-npm-modal-react

or

yarn add @oliviag-dev/simple-npm-modal-react

Usage

1-import

import { Modal } from '@oliviag-dev/simple-npm-modal-react';

2-whrite the logic to show or hide the modal

const [isShow, setIsShow] = useState(true)

3-whrite the logic for toogle the modal

const closeModal = () = { setIsShow(!isShow) }

4-use modal

<Modal text='your text!' closeModal={(e) => closeModal()} />