React Inline Confirm Component
A react component that allows you to get a confirmation of action from the user before executing an action.
Install
npm install react-inline-confirm --save
How to Use
import React from "react";import InlineConfirmButton from "react-inline-confirm"; const textValues = "Delete" "Are you sure?" "Deleting...";const confirmIconClass = `fa fa-`; React; { console;}
This would allow the user to confirm their action before calling the handleClick
function.
IsExecuting
is a required flag prop that can be used to track the execution state of the react-inline-confirm
button's click event handler from the parent component. This can come in handy when the callback method returns a promise or performs asynchronous operations in general, since those can return before the method execution actually produces a result.
Demo
yarn
from the root directoryyarn start
- In your browser, navigate to
localhost:3139
To reload, simply save your work. The app will recompile and your browser will refresh once bundled.