anissa_p14_modal

0.1.3 • Public • Published

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

props action Example
show state if true the modal is open
setshow handler modify the state by onClick On the button
text string text 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

Readme

Keywords

Package Sidebar

Install

npm i anissa_p14_modal

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

6.51 kB

Total Files

6

Last publish

Collaborators

  • nouitou