modale-react-rm

1.6.2 • Public • Published

modale-react-rm

modale-react-rm library by Romin Manogil NPM JavaScript Style Guide

Install

npm i modale-react-rm

Example

Modale

Usage

import React from 'react'
const App = () => {
   /* setting the modale*/
   const [isOpen, setIsOpen] = useState(false)
   
   const message = 'Modale is open'
   
   return (
      <div>
         /*example to open up*/
         <button type='button' onClick={setIsOpen(true)}>Save</button>
         <Modale content={message} trigger={isOpen} setTrigger={setIsOpen} />
      </div>
   )
}
export default App

Controllable Props

Prop name Description Default
content string Your message n/a
trigger boolean Open or close modale false(closed)
setTrigger cross function used boolean params () => setTrigger(false)

More info

The GitHub repository containing this library can be found at: https://github.com/RominM/modale-react-rm/

License

MIT © mglStudio

Package Sidebar

Install

npm i modale-react-rm

Weekly Downloads

0

Version

1.6.2

License

mgl-studio

Unpacked Size

7.6 MB

Total Files

54

Last publish

Collaborators

  • mgl-studio