simple-modal-component
TypeScript icon, indicating that this package has built-in type declarations

0.2.9 • Public • Published

what is this?

Open/close and style your own modal in ReactJs.

Installation

'npm i simple-modal-component'

Then...

import {Modal} from "simple-modal-component";

const [IsOpen, setIsOpen] = useState(true);

    <Modal
        ModalStatus ={IsOpen}
        setModalStatus ={setIsOpen}
        ModalContainerStyle ={{}}
        ModalBodyStyle ={{}}
        ModalInnerStyle ={{}}
        ModalCloseIconStyle ={{}}
        ModalChildren ={}
      >
      </Modal>
    </>

##Props

Modal supports several props:

  • ModalStatus - boolean (value: true / false) --- Initial value of the modal status
  • setModalStatus - function (value: true / false) --- Change the state of the Modal status
  • ModalContainerStyle - object (default value {ModalContainerStyle} / {{custom style}}) --- custom your own modalContainerstyle
  • ModalBodyStyle - object (default value {ModalBodyStyle}/ {{custom style}}) --- custom your own ModalBodyStyle style
  • ModalInnerStyle - object (default value {ModalInnerStyle}/ {{custom style}}) --- custom your own ModalInnerClass style
  • ModalCloseIconStyle - object (default value {ModalCloseIconStyle} / {{custom style}}) --- custom your own ModalCloseIconStyle style
  • ModalChildren - string (default value "" / {{custom input}}) --- custom your own inner Modal body.

Package Sidebar

Install

npm i simple-modal-component

Weekly Downloads

3

Version

0.2.9

License

ISC

Unpacked Size

7.74 kB

Total Files

5

Last publish

Collaborators

  • claudedacc