0.2.9 • Published 2 years ago

simple-modal-component v0.2.9

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

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.