From 10ffef27d5cdb69a84a2f5b41c761f686820f635 Mon Sep 17 00:00:00 2001 From: apanizo Date: Mon, 22 Oct 2018 16:47:45 +0200 Subject: [PATCH] Creation of Gno Modal component --- src/components/Modal/index.jsx | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/components/Modal/index.jsx diff --git a/src/components/Modal/index.jsx b/src/components/Modal/index.jsx new file mode 100644 index 00000000..f2c46b09 --- /dev/null +++ b/src/components/Modal/index.jsx @@ -0,0 +1,46 @@ +// @flow +import * as React from 'react' +import Modal from '@material-ui/core/Modal' +import { withStyles } from '@material-ui/core/styles' + +type Props = { + title: string, + description: string, + open: boolean, + handleClose: Function, + children: React$Node, + classes: Object, +} + +const styles = theme => ({ + root: { + alignItems: 'center', + justifyContent: 'center', + display: 'flex', + }, + paper: { + position: 'absolute', + width: theme.spacing.unit * 50, + backgroundColor: theme.palette.background.paper, + boxShadow: theme.shadows[5], + padding: theme.spacing.unit * 4, + }, +}) + +const GnoModal = ({ + title, description, open, children, handleClose, classes, +}: Props) => ( + +
+ { children } +
+
+) + +export default withStyles(styles)(GnoModal)