react modal component

Usage no npm install needed!

<script type="module">
  import acodezModal from 'https://cdn.skypack.dev/@acodez/modal';



npm_version license

React modal component.


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


import Modal from "@acodez/modal";


            Modal content here.


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