summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/components/PapperBlock/PapperBlock.js
diff options
context:
space:
mode:
Diffstat (limited to 'front/odiparpack/app/components/PapperBlock/PapperBlock.js')
-rw-r--r--front/odiparpack/app/components/PapperBlock/PapperBlock.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/front/odiparpack/app/components/PapperBlock/PapperBlock.js b/front/odiparpack/app/components/PapperBlock/PapperBlock.js
new file mode 100644
index 0000000..6663ae6
--- /dev/null
+++ b/front/odiparpack/app/components/PapperBlock/PapperBlock.js
@@ -0,0 +1,55 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import classNames from 'classnames';
+import { withStyles } from '@material-ui/core/styles';
+import { Paper, Typography } from '@material-ui/core';
+import styles from './papperStyle-jss';
+
+
+function PaperSheet(props) {
+ const {
+ classes,
+ title,
+ desc,
+ children,
+ whiteBg,
+ noMargin,
+ colorMode,
+ overflowX
+ } = props;
+ return (
+ <div>
+ <Paper className={classNames(classes.root, noMargin && classes.noMargin, colorMode && classes.colorMode)} elevation={4}>
+ <Typography variant="h6" component="h2" className={classes.title}>
+ {title}
+ </Typography>
+ <Typography component="p" className={classes.description}>
+ {desc}
+ </Typography>
+ <section className={classNames(classes.content, whiteBg && classes.whiteBg, overflowX && classes.overflowX)}>
+ {children}
+ </section>
+ </Paper>
+ </div>
+ );
+}
+
+PaperSheet.propTypes = {
+ classes: PropTypes.object.isRequired,
+ title: PropTypes.string.isRequired,
+ desc: PropTypes.string.isRequired,
+ children: PropTypes.node.isRequired,
+ whiteBg: PropTypes.bool,
+ colorMode: PropTypes.bool,
+ noMargin: PropTypes.bool,
+ overflowX: PropTypes.bool,
+};
+
+PaperSheet.defaultProps = {
+ whiteBg: false,
+ noMargin: false,
+ colorMode: false,
+ overflowX: false
+};
+
+export default withStyles(styles)(PaperSheet);