@braces/react-confirm
TypeScript icon, indicating that this package has built-in type declarations

0.10.4 • Public • Published

React Confirm

npm Version

This package is deprecate, Please check @braces/reconfirm

Install

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.

Package Sidebar

Install

npm i @braces/react-confirm

Weekly Downloads

9

Version

0.10.4

License

MIT

Unpacked Size

43.8 kB

Total Files

12

Last publish

Collaborators

  • hafeez1042