@acodez/modal

1.1.1 • Public • Published

@acodez/modal

npm_version license

React modal component.



Installation

npm install @acodez/modal

Props API

Property Type Required Description
actionBtnText string no Action button text, default - show modal
cancelBtnText string no Cancel button text, default - Cancel
saveBtnText string no Save button text, button will be hidden if no value entered
saveBtnFunction string no save button function
showCloseBtn string no show close button on modal or not
disableBgClose string no if you want to limit closing of modal to button click

Usage

import Modal from "@acodez/modal";

Basic

    <Modal>
        <p>
            Modal content here.
        </p>
    </Modal>

Advanced

    <Modal disableBgClose showCloseBtn saveBtnFunction={saveFunction} actionBtnText="open modal" saveBtnText="Save" cancelBtnText="Cancel" modalHeading="This is modal heading">
        <p>
            To close this modal, press the cancel button below or use the Escape key on desktop.
        </p>
    </Modal>

Readme

Keywords

Package Sidebar

Install

npm i @acodez/modal

Weekly Downloads

4

Version

1.1.1

License

MIT

Unpacked Size

16.4 kB

Total Files

12

Last publish

Collaborators

  • nimishapk
  • hridyac
  • sanjuacodez
  • ssacodez
  • arunacodez
  • ikku47