1.1.1 • Published 3 years ago

@acodez/modal v1.1.1

Weekly downloads
26
License
MIT
Repository
-
Last release
3 years ago

@acodez/modal

npm_version license

React modal component.



Installation

npm install @acodez/modal

Props API

PropertyTypeRequiredDescription
actionBtnTextstringnoAction button text, default - show modal
cancelBtnTextstringnoCancel button text, default - Cancel
saveBtnTextstringnoSave button text, button will be hidden if no value entered
saveBtnFunctionstringnosave button function
showCloseBtnstringnoshow close button on modal or not
disableBgClosestringnoif 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>
1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago