From 507c0e3a1a20a782ca360b3c86dbe7215e6c787c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 28 Dec 2017 17:23:56 +0000 Subject: [PATCH] Add a configrmation dialog widget. --- src/widgets/ConfirmationDialog.tsx | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/widgets/ConfirmationDialog.tsx diff --git a/src/widgets/ConfirmationDialog.tsx b/src/widgets/ConfirmationDialog.tsx new file mode 100644 index 0000000..80a680f --- /dev/null +++ b/src/widgets/ConfirmationDialog.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; + +import Dialog from 'material-ui/Dialog'; +import FlatButton from 'material-ui/FlatButton'; + +import { pure } from 'recompose'; + +export default pure((_props: any) => { + const { + onCancel, + onOk, + ...props, + } = _props; + const actions = [ + ( + + ) + , + ( + + ), + ]; + + return ( + + ); +});