1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", {
|
6 | value: true
|
7 | });
|
8 | exports.default = void 0;
|
9 |
|
10 | var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
11 |
|
12 | var _react = _interopRequireDefault(require("react"));
|
13 |
|
14 | var _styles = require("@material-ui/core/styles");
|
15 |
|
16 | var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
17 |
|
18 | var _propTypes = _interopRequireDefault(require("prop-types"));
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | var styles = function styles(_ref) {
|
24 | var _container;
|
25 |
|
26 | var breakpoints = _ref.breakpoints;
|
27 | return {
|
28 |
|
29 | container: (_container = {
|
30 | display: 'flex',
|
31 | alignItems: 'flex-start',
|
32 | height: '100%',
|
33 | padding: '30px 39px 0'
|
34 | }, (0, _defineProperty2.default)(_container, breakpoints.up('xs'), {
|
35 | padding: '30px 39px 0'
|
36 | }), (0, _defineProperty2.default)(_container, breakpoints.down('xs'), {
|
37 | padding: 0
|
38 | }), _container),
|
39 | containerMiddle: {
|
40 | paddingTop: 0
|
41 | },
|
42 | paper: (0, _defineProperty2.default)({
|
43 | width: '100%',
|
44 | margin: '0 auto'
|
45 | }, breakpoints.down('xs'), {
|
46 | height: '100%',
|
47 | boxShadow: 'none',
|
48 | padding: '25px 31px 0'
|
49 |
|
50 | }),
|
51 | paperMiddle: (0, _defineProperty2.default)({
|
52 | width: 'auto',
|
53 | maxWidth: '100%',
|
54 | margin: 'auto'
|
55 | }, breakpoints.down('xs'), {
|
56 | width: '100%'
|
57 | }),
|
58 | paperPadding: {
|
59 | padding: 30
|
60 | },
|
61 |
|
62 | noPaper: {
|
63 | background: 'transparent',
|
64 | boxShadow: 'none'
|
65 | }
|
66 | };
|
67 | };
|
68 |
|
69 | var PageJSX = function PageJSX(_ref2) {
|
70 | var children = _ref2.children,
|
71 | classes = _ref2.classes,
|
72 | middle = _ref2.middle,
|
73 | noPadding = _ref2.noPadding,
|
74 | noPaper = _ref2.noPaper,
|
75 | _ref2$containerClass = _ref2.containerClass,
|
76 | containerClass = _ref2$containerClass === void 0 ? '' : _ref2$containerClass,
|
77 | _ref2$paperClass = _ref2.paperClass,
|
78 | paperClass = _ref2$paperClass === void 0 ? '' : _ref2$paperClass,
|
79 | _ref2$maxWidth = _ref2.maxWidth,
|
80 | maxWidth = _ref2$maxWidth === void 0 ? 1012 : _ref2$maxWidth;
|
81 | return _react.default.createElement("div", {
|
82 | className: "".concat(classes.container, " ").concat(containerClass, " ").concat(middle ? classes.containerMiddle : '')
|
83 | }, _react.default.createElement(_Paper.default, {
|
84 | className: "".concat(classes.paper, " ").concat(paperClass, " ").concat(noPaper ? classes.noPaper : '', " ").concat(noPadding ? '' : classes.paperPadding, " ").concat(middle ? classes.paperMiddle : ''),
|
85 | style: {
|
86 | maxWidth: maxWidth
|
87 | }
|
88 | }, children));
|
89 | };
|
90 |
|
91 | PageJSX.propTypes = {
|
92 | children: _propTypes.default.any,
|
93 | classes: _propTypes.default.object.isRequired,
|
94 | noPaper: _propTypes.default.bool,
|
95 | noPadding: _propTypes.default.bool,
|
96 | containerClass: _propTypes.default.string,
|
97 | paperClass: _propTypes.default.string,
|
98 | maxWidth: _propTypes.default.any,
|
99 | middle: _propTypes.default.bool
|
100 | };
|
101 | var Page = (0, _styles.withStyles)(styles)(PageJSX);
|
102 | var _default = Page;
|
103 | exports.default = _default; |
\ | No newline at end of file |