Skip to content

WillemJou/simple-react-modal-wj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-react-modal-wj

A Simple modal

NPM JavaScript Style Guide

Install

npm install --save simple-react-modal-wj

Usage Example

import { Modal } from 'simple-react-modal-wj'

function EnclosingFunction() {
  const [openModal, setOpenModal] = useState(false)
  return (
    <button onclick={setOpenModal}>Click to open modal 😉</button>
    <Modal
      isOpen={openModal}
      onClose={() => {
        setOpenModal(false)
        return true
      }}
    />
  )
}

Options

You can use those props to add specific content through the modal :

 title={here you can add a title}
subTitle={here you can add a subtitle near the title}
content={here yu can add your main content}

License

MIT © WillemJou

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published