1.0.5 • Published 4 years ago

react-simple-promise-modal v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Thanks for visiting

A react customizable modal that can be used to capture a user's response to the modal. Include prompt for text response. Easy integration. Uses Bootstrap 3.

Demo

NPM JavaScript Style Guide

Install

npm install --save react-simple-promise-modal

Usage

this.confirmModalRef.show()
  .then((result) => {
    console.log('resolve:'+JSON.stringify(result));
  })
  .catch((err) => {
    console.log('reject:'+JSON.stringify(err));
  });

For more details, check out the API below.

Component API

<ConfirmPromiseModal> component:

PropertyTypeDefaultRequiredDescription
modalIdStringn/ayesUnique id for modal
labelIdStringn/ayesUnique id for modal title
renderFunctionn/ayesMain message on modal
onRefFunctionn/ayesUsed to mount for parent usage
yesButtonString'Confirm'noText on confirm button
noButtonString'Cancel'noText on cancel button
showTextAreaBooleanfalsenoShow textarea input
titleString'Notice'noTitle on modal

Render prop example (String or Component):

render={typeof this.state.modalMsg === 'string' ? () => <span>{this.state.modalMsg}</span> : () => this.state.modalMsg}

Note

Bootstrap 4 uses possibly will have to hard code any modal styling differences.

Support or Contact

Any questions? Check out our documentation or contact support and we’ll help you sort it out.

License

MIT © calabashlabsllc

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago