1.1.3 • Published 1 year ago

react-confirm-popup v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npm version npm downloads Known Vulnerabilities

npm.io

Features

  • Create popup for confirm actions with React.js.
  • Custom trigger button.
  • Custom Confirm/Cancel functions.
  • Modern UI

Browser Support

ChromeFirefoxSafariOperaEdgeIE
Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔11 ✔

Installing

Package manager

Using npm:

$ npm install react-confirm-popup

Using yarn:

$ yarn add react-confirm-popup

Once the package is installed, you can import the library using import approach:

import ReactConfirmPopup from 'react-confirm-popup';

Note next.js for next.js projects you need to add the this code to next.config.js to make sure the project will build with no errors.

if (typeof require !=== "undefined") {
  require.extensions[".css"] = (file) => {}
}

Example

import React from 'react';
import ReactConfirmPopup from 'react-confirm-popup';

function App() {
  return (
    <ReactConfirmPopup trigger={<button>Click Here</button>} />
  );
}

export default App;

Advanced use

<ReactConfirmPopup
    trigger={<button>Click Here</button>}
    title="Are you sure you want to delete?"
    text={
        <div className="">
        Are you sure you should delete these items permanently?
        </div>
    }
    confirmText="Yea! sure"
    cancelText="Nope!"
    onConfirmClicked={someConfirmHandleFunction}
    onCancelClicked={someCancelHandleFunction}
    />

Credits

Thanks to my family and friends for the support all over the years

License

MIT

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago