Added confirm
This commit is contained in:
parent
9e5fc1baba
commit
7a672bca87
7 changed files with 159 additions and 26 deletions
11
imports/ui/components/Prompt/Confirm.js
Normal file
11
imports/ui/components/Prompt/Confirm.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { createConfirmation } from 'react-confirm';
|
||||
import Prompt from './Prompt';
|
||||
|
||||
// create confirm function
|
||||
const confirm = createConfirmation(Prompt);
|
||||
|
||||
// This is optional. But I recommend to define your confirm function easy to call.
|
||||
export default function (confirmation, options = {}) {
|
||||
// You can pass whatever you want to the component. These arguments will be your Component's props
|
||||
return confirm({ confirmation, ...options });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue