React Confirm
@braces/reconfirm
This package is deprecate, Please checkInstall
1 Install react confirm as dependency
# Using yarn package manager
$ yarn add @braces/react-confirm
# Using npm package manager
$ npm install --save @braces/react-confirm
2 Import React confirm module
// ES6
import Confirm from "@braces/react-confirm"
// ES5
var Confirm = require("@braces/react-confirm");
Example
import React from "react";
import confirm from "@braces/react-confirm";
const Component = (props) => {
return (
<div>
<button onClick={props.confirm}>Confirm</button>
{props.confirmed ? "Is confirmed" : "Is not confirmed"}
</div>
);
};
const ConfirmDialog= (props) => {
return (
<div>
Confirm Message...
<button onClick={props.doConfirm}>Confirm</button>
</div>
);
}
export default confirm(ConfirmDialog)(HomePage)
Contributing!
All contributions are super welcome!
License
React Confirm is MIT licensed.