0.1.3 • Published 2 years ago

anissa_p14_modal v0.1.3

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

forthebadge

NPM link

react modal by anissa on NPM

Modal Component with Reactjs

This plugin was bootstrapped with Create-React-app .

Feature

show a basic modal , with close button.

install

npm i anissa_p14_modal

or

yarn add anissa_p14_modal

use

propsactionExample
showstateif true the modal is open
setshowhandlermodify the state by onClick On the button
textstringtext of the modal

example

 // 1 - Import the Modal component into the file
   import { Modal } from 'anissa_p14_modal';

   const App = () => {
       // 2 - Setup state and handler for the modal
       const [modalIsOpen, setModalIsOpen] = useState(false);
       
    return (
   <>
       <Modal
         show={modalIsOpen}
         setShow={setModalIsOpen}
         text="Employee has been created!"
       />
   </>
       )
       }

result

Result

Author

Anissa Mandhouj