2.0.0 • Published 2 years ago
cancelable-action-button v2.0.0
Cancelable Action Button
The Cancellable Action Button is a React component available to use in any React projects. Its purpose is to allow a user to cancel an action they've just initiated for a short amount of time, before the action is carried out.
It serves a similar purpose to an "Are You Sure?" confirmation dialog after a user initiates an action, but with a different execution.
Installation
run npm install cancelable-action-button
in your React project.
Preview
For a preview of the component and it's props in action go to the docs
Props
Prop | Type | Description | Default |
---|---|---|---|
actionText | string | The label of the button when the user can initiate the action | Send Important File |
cancelText | string | The label of the button when the user can cancel the initiated action | Cancel Sending |
cancelDuration | number | The amount of time in ms the user can cancel the initiated action | 5000 |
onClick | Function | The action of the button. | - |