react-yes-or-no

2.4.0 • Public • Published

YesOrNo

A react pop up confirmation component

How to use react-yes-or-no

- import YesOrNo from 'react-yes-or-no

Which props to pass

- show --> boolean value to display the pop up.

- onClose --> A function that returns a boolean value. If it is true the pop up will close.

- confirmHandler --> A function that determines what to do when you press the confirmation button.

- isLoading --> A boolean value to make the spinner work.

- message --> The message you want to display on the pop up.

- loadingText --> The text that appears while loading. Default is "Loading".

-confirmText --> The text that appears on the confirmation button.

- cancelText --> The text that appears on the cancel button.

How to take advantage of the dynamic styling feature

You can do it by passing the required props.
- width --> default 361 px
- height --> default 201 px

Readme

Keywords

none

Package Sidebar

Install

npm i react-yes-or-no

Weekly Downloads

1

Version

2.4.0

License

MIT

Unpacked Size

162 kB

Total Files

3

Last publish

Collaborators

  • alpha93