umwd-components 0.1.87 → 0.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ColumnsSection.js +66 -0
- package/dist/cjs/components/FeaturesSection.js +14 -6
- package/dist/cjs/components/FleetSection.js +12 -4
- package/dist/cjs/components/Footer.js +8 -1
- package/dist/cjs/components/Page.js +6 -0
- package/dist/cjs/components/TextImageSection.js +14 -3
- package/dist/cjs/lib/AmbulanceIcon.js +45 -0
- package/dist/cjs/lib/getIcon.js +18 -0
- package/dist/esm/components/BulletList.js +5 -5
- package/dist/esm/components/Button.js +2 -2
- package/dist/esm/components/ColumnsSection.js +64 -0
- package/dist/esm/components/ContactForm.js +25 -25
- package/dist/esm/components/FeaturesSection.js +25 -17
- package/dist/esm/components/FleetSection.js +31 -23
- package/dist/esm/components/Footer.js +45 -38
- package/dist/esm/components/HeroSection.js +10 -10
- package/dist/esm/components/IconSection.js +8 -8
- package/dist/esm/components/NavBar.js +40 -40
- package/dist/esm/components/Page.js +15 -9
- package/dist/esm/components/Stack.js +2 -2
- package/dist/esm/components/StrapiImage.js +2 -2
- package/dist/esm/components/TextImageSection.js +25 -14
- package/dist/esm/components/WebsitePlaceholder.js +9 -9
- package/dist/esm/components/WhatsAppClickToChatButton.js +8 -8
- package/dist/esm/lib/AmbulanceIcon.js +22 -0
- package/dist/esm/lib/getIcon.js +18 -0
- package/package.json +1 -1
- package/src/components/ColumnsSection.tsx +85 -0
- package/src/components/FeaturesSection.tsx +22 -9
- package/src/components/FleetSection.tsx +18 -5
- package/src/components/Footer.js +4 -1
- package/src/components/Page.js +3 -0
- package/src/components/TextImageSection.tsx +24 -5
- package/src/lib/AmbulanceIcon.svg +13 -0
- package/src/lib/AmbulanceIcon.tsx +22 -0
- package/src/lib/getIcon.ts +18 -0
- package/src/stories/Footer.stories.js +7 -7
- package/src/stories/Page.stories.js +28 -17
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var material = require('@mui/material');
|
|
11
|
+
var getIcon = require('../lib/getIcon.js');
|
|
12
|
+
|
|
13
|
+
function ColumnsSection(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
data
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
column,
|
|
19
|
+
maxWidth
|
|
20
|
+
} = data;
|
|
21
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
22
|
+
maxWidth: maxWidth || "lg",
|
|
23
|
+
sx: {
|
|
24
|
+
my: 1
|
|
25
|
+
}
|
|
26
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
27
|
+
spacing: 2,
|
|
28
|
+
direction: "row",
|
|
29
|
+
justifyContent: "stretch",
|
|
30
|
+
flexWrap: "wrap",
|
|
31
|
+
sx: {
|
|
32
|
+
width: "100%"
|
|
33
|
+
},
|
|
34
|
+
useFlexGap: true
|
|
35
|
+
}, column.map(column => {
|
|
36
|
+
const Icon = getIcon.default(column.icon);
|
|
37
|
+
return /*#__PURE__*/React.createElement(material.Paper, {
|
|
38
|
+
sx: {
|
|
39
|
+
p: 2
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
42
|
+
variant: "h5",
|
|
43
|
+
sx: {
|
|
44
|
+
mb: 2,
|
|
45
|
+
display: "flex",
|
|
46
|
+
justifyContent: "flex-start",
|
|
47
|
+
alignItems: "center"
|
|
48
|
+
}
|
|
49
|
+
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
+
sx: {
|
|
51
|
+
mr: 2,
|
|
52
|
+
mt: 0.2,
|
|
53
|
+
width: "50px",
|
|
54
|
+
height: "50px",
|
|
55
|
+
fill: "currentColor",
|
|
56
|
+
stroke: "none"
|
|
57
|
+
}
|
|
58
|
+
}), column.heading), /*#__PURE__*/React.createElement(material.Typography, {
|
|
59
|
+
variant: "body2",
|
|
60
|
+
color: "text.secondary",
|
|
61
|
+
component: "div"
|
|
62
|
+
}, column.text));
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.ColumnsSection = ColumnsSection;
|
|
@@ -15,10 +15,12 @@ function FeatureSection(_ref) {
|
|
|
15
15
|
data
|
|
16
16
|
} = _ref;
|
|
17
17
|
const {
|
|
18
|
-
feature
|
|
18
|
+
feature,
|
|
19
|
+
maxWidth
|
|
19
20
|
} = data;
|
|
21
|
+
const theme = material.useTheme();
|
|
20
22
|
return /*#__PURE__*/React.createElement(material.Container, {
|
|
21
|
-
maxWidth: "lg",
|
|
23
|
+
maxWidth: maxWidth || "lg",
|
|
22
24
|
sx: {
|
|
23
25
|
my: 1
|
|
24
26
|
}
|
|
@@ -28,7 +30,13 @@ function FeatureSection(_ref) {
|
|
|
28
30
|
justifyContent: "stretch",
|
|
29
31
|
flexWrap: "wrap",
|
|
30
32
|
sx: {
|
|
31
|
-
width: "100%"
|
|
33
|
+
width: "100%",
|
|
34
|
+
[theme.breakpoints.up("xs")]: {
|
|
35
|
+
flexDirection: "column"
|
|
36
|
+
},
|
|
37
|
+
[theme.breakpoints.up("sm")]: {
|
|
38
|
+
flexDirection: "row"
|
|
39
|
+
}
|
|
32
40
|
},
|
|
33
41
|
useFlexGap: true
|
|
34
42
|
}, feature.map(feature => {
|
|
@@ -40,9 +48,9 @@ function FeatureSection(_ref) {
|
|
|
40
48
|
flexDirection: "column",
|
|
41
49
|
justifyContent: "space-between",
|
|
42
50
|
flex: 1,
|
|
43
|
-
minWidth:
|
|
51
|
+
minWidth: 275
|
|
44
52
|
}
|
|
45
|
-
}, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.
|
|
53
|
+
}, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Box, {
|
|
46
54
|
sx: {
|
|
47
55
|
height: 140,
|
|
48
56
|
display: "grid",
|
|
@@ -83,7 +91,7 @@ function FeatureSection(_ref) {
|
|
|
83
91
|
}
|
|
84
92
|
}, /*#__PURE__*/React.createElement(material.Button, {
|
|
85
93
|
size: "small"
|
|
86
|
-
}, "
|
|
94
|
+
}, "Contact"), /*#__PURE__*/React.createElement(material.Button, {
|
|
87
95
|
size: "small"
|
|
88
96
|
}, "Learn More")));
|
|
89
97
|
})));
|
|
@@ -18,10 +18,12 @@ function FleetSection(_ref) {
|
|
|
18
18
|
data
|
|
19
19
|
} = _ref;
|
|
20
20
|
const {
|
|
21
|
-
airplane
|
|
21
|
+
airplane,
|
|
22
|
+
maxWidth
|
|
22
23
|
} = data;
|
|
24
|
+
const theme = material.useTheme();
|
|
23
25
|
return /*#__PURE__*/React.createElement(material.Container, {
|
|
24
|
-
maxWidth: "lg",
|
|
26
|
+
maxWidth: maxWidth || "lg",
|
|
25
27
|
sx: {
|
|
26
28
|
my: 1
|
|
27
29
|
}
|
|
@@ -31,7 +33,13 @@ function FleetSection(_ref) {
|
|
|
31
33
|
justifyContent: "stretch",
|
|
32
34
|
flexWrap: "wrap",
|
|
33
35
|
sx: {
|
|
34
|
-
width: "100%"
|
|
36
|
+
width: "100%",
|
|
37
|
+
[theme.breakpoints.up("xs")]: {
|
|
38
|
+
flexDirection: "column"
|
|
39
|
+
},
|
|
40
|
+
[theme.breakpoints.up("sm")]: {
|
|
41
|
+
flexDirection: "row"
|
|
42
|
+
}
|
|
35
43
|
},
|
|
36
44
|
useFlexGap: true
|
|
37
45
|
}, airplane.map(airplane => /*#__PURE__*/React.createElement(material.Card, {
|
|
@@ -41,7 +49,7 @@ function FleetSection(_ref) {
|
|
|
41
49
|
flexDirection: "column",
|
|
42
50
|
justifyContent: "space-between",
|
|
43
51
|
flex: 1,
|
|
44
|
-
minWidth:
|
|
52
|
+
minWidth: 275
|
|
45
53
|
}
|
|
46
54
|
}, /*#__PURE__*/React.createElement(material.CardHeader, {
|
|
47
55
|
title: airplane.name,
|
|
@@ -13,6 +13,7 @@ var React = require('react');
|
|
|
13
13
|
var material = require('@mui/material');
|
|
14
14
|
var Link = require('next/link');
|
|
15
15
|
var Image = require('next/image');
|
|
16
|
+
var getIcon = require('../lib/getIcon.js');
|
|
16
17
|
var PropTypes = require('prop-types');
|
|
17
18
|
|
|
18
19
|
Footer.propTypes = {
|
|
@@ -143,11 +144,17 @@ function Footer(_ref) {
|
|
|
143
144
|
color: "primary.contrastText"
|
|
144
145
|
}
|
|
145
146
|
}, company_socials.map((company_social, index) => {
|
|
147
|
+
const Icon = getIcon.default(company_social.icon);
|
|
146
148
|
return /*#__PURE__*/React.createElement(material.IconButton, {
|
|
147
149
|
key: index,
|
|
148
150
|
color: "inherit",
|
|
149
151
|
href: company_social.url
|
|
150
|
-
},
|
|
152
|
+
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
153
|
+
sx: {
|
|
154
|
+
mr: 2,
|
|
155
|
+
mt: 0.2
|
|
156
|
+
}
|
|
157
|
+
}));
|
|
151
158
|
})))), /*#__PURE__*/React.createElement(material.Grid, {
|
|
152
159
|
item: true,
|
|
153
160
|
xs: 12
|
|
@@ -16,6 +16,7 @@ var HeroSection = require('./HeroSection.js');
|
|
|
16
16
|
var FeaturesSection = require('./FeaturesSection.js');
|
|
17
17
|
var FleetSection = require('./FleetSection.js');
|
|
18
18
|
var IconSection = require('./IconSection.js');
|
|
19
|
+
var ColumnsSection = require('./ColumnsSection.js');
|
|
19
20
|
var material = require('@mui/material');
|
|
20
21
|
var ContactForm = require('./ContactForm.js');
|
|
21
22
|
|
|
@@ -51,6 +52,11 @@ function blockRenderer(block) {
|
|
|
51
52
|
key: block.id,
|
|
52
53
|
data: block
|
|
53
54
|
});
|
|
55
|
+
case "layout.columns-section":
|
|
56
|
+
return /*#__PURE__*/React.createElement(ColumnsSection.ColumnsSection, {
|
|
57
|
+
key: block.id,
|
|
58
|
+
data: block
|
|
59
|
+
});
|
|
54
60
|
default:
|
|
55
61
|
return null;
|
|
56
62
|
}
|
|
@@ -42,6 +42,7 @@ function TextImageSection(_ref) {
|
|
|
42
42
|
/* TODO Text_content should deal with linebreaks,
|
|
43
43
|
reading up upon mui-markdown docs is advised */
|
|
44
44
|
|
|
45
|
+
const theme = material.useTheme();
|
|
45
46
|
return /*#__PURE__*/React.createElement(material.Container, {
|
|
46
47
|
maxWidth: maxWidth || "lg",
|
|
47
48
|
sx: {
|
|
@@ -60,10 +61,17 @@ function TextImageSection(_ref) {
|
|
|
60
61
|
}
|
|
61
62
|
}, title), /*#__PURE__*/React.createElement(material.Stack, {
|
|
62
63
|
spacing: 2,
|
|
63
|
-
direction: reverse ? "row-reverse" : "row"
|
|
64
|
+
direction: reverse ? "row-reverse" : "row",
|
|
65
|
+
gap: 2,
|
|
66
|
+
sx: {
|
|
67
|
+
width: "100%",
|
|
68
|
+
[theme.breakpoints.down("sm")]: {
|
|
69
|
+
flexDirection: "column"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
64
72
|
}, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React.createElement(material.Box, {
|
|
65
73
|
sx: {
|
|
66
|
-
|
|
74
|
+
minWidth: 275,
|
|
67
75
|
height: "100%",
|
|
68
76
|
overflow: "hidden",
|
|
69
77
|
display: "flex",
|
|
@@ -77,7 +85,10 @@ function TextImageSection(_ref) {
|
|
|
77
85
|
src: image.url
|
|
78
86
|
})), text !== null && text !== undefined && /*#__PURE__*/React.createElement(material.Box, {
|
|
79
87
|
sx: {
|
|
80
|
-
width:
|
|
88
|
+
/* width:
|
|
89
|
+
image?.url !== null && image?.url !== undefined
|
|
90
|
+
? "50%"
|
|
91
|
+
: "100%", */
|
|
81
92
|
height: "100%",
|
|
82
93
|
overflow: "hidden",
|
|
83
94
|
display: "flex",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
|
+
|
|
11
|
+
var React = require('react');
|
|
12
|
+
var SvgIcon = require('@mui/material/SvgIcon');
|
|
13
|
+
|
|
14
|
+
function _interopNamespaceDefault(e) {
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
32
|
+
|
|
33
|
+
function AmbulanceIcon(props) {
|
|
34
|
+
return /*#__PURE__*/React__namespace.createElement(SvgIcon, props, /*#__PURE__*/React__namespace.createElement("svg", {
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
viewBox: "0 0 24 24",
|
|
38
|
+
strokeWidth: 1,
|
|
39
|
+
stroke: "currentColor"
|
|
40
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
41
|
+
d: "M20,8h-3V7c0-1.1-0.9-2-2-2H3C1.9,5,1,5.9,1,7v10h2c0,1.7,1.3,3,3,3s3-1.3,3-3h6c0,1.7,1.3,3,3,3s3-1.3,3-3h2v-5L20,8z\r M6,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S6.8,18.5,6,18.5z M12.2,11.3h-1.7V13H8.1v-1.7H6.5V9h1.7V7.3h2.3\r V9h1.7V11.3z M18,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S18.8,18.5,18,18.5z M17,12V9.5h2.5l2,2.5H17z"
|
|
42
|
+
})));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.default = AmbulanceIcon;
|
package/dist/cjs/lib/getIcon.js
CHANGED
|
@@ -28,6 +28,12 @@ var PropaneTankIcon = require('@mui/icons-material/PropaneTank');
|
|
|
28
28
|
var MasksIcon = require('@mui/icons-material/Masks');
|
|
29
29
|
var BoltIcon = require('@mui/icons-material/Bolt');
|
|
30
30
|
var BedIcon = require('@mui/icons-material/Bed');
|
|
31
|
+
var AmbulanceIcon = require('./AmbulanceIcon.js');
|
|
32
|
+
var LinkedInIcon = require('@mui/icons-material/LinkedIn');
|
|
33
|
+
var FaceBookIcon = require('@mui/icons-material/Facebook');
|
|
34
|
+
var TwitterIcon = require('@mui/icons-material/Twitter');
|
|
35
|
+
var LocalShippingIcon = require('@mui/icons-material/LocalShipping');
|
|
36
|
+
var InstagramIcon = require('@mui/icons-material/Instagram');
|
|
31
37
|
|
|
32
38
|
function getIcon(icon) {
|
|
33
39
|
switch (icon) {
|
|
@@ -71,6 +77,18 @@ function getIcon(icon) {
|
|
|
71
77
|
return BoltIcon;
|
|
72
78
|
case "BedIcon":
|
|
73
79
|
return BedIcon;
|
|
80
|
+
case "AmbulanceIcon":
|
|
81
|
+
return AmbulanceIcon.default;
|
|
82
|
+
case "LinkedInIcon":
|
|
83
|
+
return LinkedInIcon;
|
|
84
|
+
case "FaceBookIcon":
|
|
85
|
+
return FaceBookIcon;
|
|
86
|
+
case "TwitterIcon":
|
|
87
|
+
return TwitterIcon;
|
|
88
|
+
case "LocalShippingIcon":
|
|
89
|
+
return LocalShippingIcon;
|
|
90
|
+
case "InstagramIcon":
|
|
91
|
+
return InstagramIcon;
|
|
74
92
|
default:
|
|
75
93
|
return null;
|
|
76
94
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import React__default from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import { Stack, Typography, SvgIcon } from '@mui/material';
|
|
11
11
|
import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
|
|
@@ -16,9 +16,9 @@ function BulletList(_ref) {
|
|
|
16
16
|
bulletSVG
|
|
17
17
|
} = _ref;
|
|
18
18
|
console.log("bulletSVG2", bulletSVG);
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
20
20
|
spacing: 2
|
|
21
|
-
}, bullets.map((bullet, index) => /*#__PURE__*/
|
|
21
|
+
}, bullets.map((bullet, index) => /*#__PURE__*/React__default.createElement(Typography, {
|
|
22
22
|
key: index,
|
|
23
23
|
sx: {
|
|
24
24
|
verticalAlign: "center",
|
|
@@ -26,11 +26,11 @@ function BulletList(_ref) {
|
|
|
26
26
|
justifyContent: "flex-start",
|
|
27
27
|
display: "inline-flex"
|
|
28
28
|
}
|
|
29
|
-
}, bulletSVG ? /*#__PURE__*/
|
|
29
|
+
}, bulletSVG ? /*#__PURE__*/React__default.createElement(SvgIcon, {
|
|
30
30
|
sx: {
|
|
31
31
|
mr: 1
|
|
32
32
|
}
|
|
33
|
-
}, bulletSVG) : /*#__PURE__*/
|
|
33
|
+
}, bulletSVG) : /*#__PURE__*/React__default.createElement(FiberManualRecordIcon, null), bullet)));
|
|
34
34
|
}
|
|
35
35
|
BulletList.propTypes = {
|
|
36
36
|
bullets: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import React__default from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
|
|
10
10
|
function Button(_ref) {
|
|
@@ -26,7 +26,7 @@ function Button(_ref) {
|
|
|
26
26
|
padding: "".concat(0.5 * scale, "rem ").concat(1 * scale, "rem"),
|
|
27
27
|
border: "none"
|
|
28
28
|
};
|
|
29
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
30
30
|
style: style,
|
|
31
31
|
onClick: onClick
|
|
32
32
|
}, label);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { Container, Stack, Paper, Typography } from '@mui/material';
|
|
9
|
+
import getIcon from '../lib/getIcon.js';
|
|
10
|
+
|
|
11
|
+
function ColumnsSection(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
data
|
|
14
|
+
} = _ref;
|
|
15
|
+
const {
|
|
16
|
+
column,
|
|
17
|
+
maxWidth
|
|
18
|
+
} = data;
|
|
19
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
20
|
+
maxWidth: maxWidth || "lg",
|
|
21
|
+
sx: {
|
|
22
|
+
my: 1
|
|
23
|
+
}
|
|
24
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
25
|
+
spacing: 2,
|
|
26
|
+
direction: "row",
|
|
27
|
+
justifyContent: "stretch",
|
|
28
|
+
flexWrap: "wrap",
|
|
29
|
+
sx: {
|
|
30
|
+
width: "100%"
|
|
31
|
+
},
|
|
32
|
+
useFlexGap: true
|
|
33
|
+
}, column.map(column => {
|
|
34
|
+
const Icon = getIcon(column.icon);
|
|
35
|
+
return /*#__PURE__*/React__default.createElement(Paper, {
|
|
36
|
+
sx: {
|
|
37
|
+
p: 2
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
40
|
+
variant: "h5",
|
|
41
|
+
sx: {
|
|
42
|
+
mb: 2,
|
|
43
|
+
display: "flex",
|
|
44
|
+
justifyContent: "flex-start",
|
|
45
|
+
alignItems: "center"
|
|
46
|
+
}
|
|
47
|
+
}, Icon !== null && /*#__PURE__*/React__default.createElement(Icon, {
|
|
48
|
+
sx: {
|
|
49
|
+
mr: 2,
|
|
50
|
+
mt: 0.2,
|
|
51
|
+
width: "50px",
|
|
52
|
+
height: "50px",
|
|
53
|
+
fill: "currentColor",
|
|
54
|
+
stroke: "none"
|
|
55
|
+
}
|
|
56
|
+
}), column.heading), /*#__PURE__*/React__default.createElement(Typography, {
|
|
57
|
+
variant: "body2",
|
|
58
|
+
color: "text.secondary",
|
|
59
|
+
component: "div"
|
|
60
|
+
}, column.text));
|
|
61
|
+
})));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { ColumnsSection };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import React__default from 'react';
|
|
9
9
|
import { Container, Stack, Typography, Paper, Button, TextField } from '@mui/material';
|
|
10
10
|
import isEmail from 'validator/lib/isEmail';
|
|
11
11
|
|
|
@@ -16,20 +16,20 @@ function ContactForm(_ref) {
|
|
|
16
16
|
const {
|
|
17
17
|
maxWidth
|
|
18
18
|
} = data;
|
|
19
|
-
const [formValues, setFormValues] =
|
|
19
|
+
const [formValues, setFormValues] = React__default.useState({
|
|
20
20
|
name: "",
|
|
21
21
|
email: "",
|
|
22
22
|
subject: "",
|
|
23
23
|
message: ""
|
|
24
24
|
});
|
|
25
|
-
const [formErrors, setFormErrors] =
|
|
25
|
+
const [formErrors, setFormErrors] = React__default.useState({});
|
|
26
26
|
|
|
27
27
|
// Setting button text on form submission
|
|
28
|
-
|
|
28
|
+
React__default.useState("Send");
|
|
29
29
|
|
|
30
30
|
// Setting success or failure messages states
|
|
31
|
-
const [showSuccessMessage, setShowSuccessMessage] =
|
|
32
|
-
const [showFailureMessage, setShowFailureMessage] =
|
|
31
|
+
const [showSuccessMessage, setShowSuccessMessage] = React__default.useState(false);
|
|
32
|
+
const [showFailureMessage, setShowFailureMessage] = React__default.useState(false);
|
|
33
33
|
const handleChange = e => {
|
|
34
34
|
const {
|
|
35
35
|
name,
|
|
@@ -122,45 +122,45 @@ function ContactForm(_ref) {
|
|
|
122
122
|
console.log("errors from validate", errors);
|
|
123
123
|
return errors;
|
|
124
124
|
};
|
|
125
|
-
return /*#__PURE__*/
|
|
125
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
126
126
|
maxWidth: maxWidth ? maxWidth : "lg",
|
|
127
127
|
sx: {
|
|
128
128
|
my: 1
|
|
129
129
|
}
|
|
130
|
-
}, /*#__PURE__*/
|
|
130
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
131
131
|
spacing: 2,
|
|
132
132
|
sx: {
|
|
133
133
|
width: "100%"
|
|
134
134
|
}
|
|
135
|
-
}, /*#__PURE__*/
|
|
135
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
136
136
|
variant: "h6",
|
|
137
137
|
align: "center"
|
|
138
|
-
}, "Write us"), /*#__PURE__*/
|
|
138
|
+
}, "Write us"), /*#__PURE__*/React__default.createElement(Typography, {
|
|
139
139
|
variant: "body1",
|
|
140
140
|
align: "center"
|
|
141
|
-
}, "We're open for any suggestion or just to have a chat"), showSuccessMessage && /*#__PURE__*/
|
|
141
|
+
}, "We're open for any suggestion or just to have a chat"), showSuccessMessage && /*#__PURE__*/React__default.createElement(Paper, {
|
|
142
142
|
sx: {
|
|
143
143
|
p: 2
|
|
144
144
|
}
|
|
145
|
-
}, /*#__PURE__*/
|
|
145
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
146
146
|
spacing: 2
|
|
147
|
-
}, /*#__PURE__*/
|
|
147
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
148
148
|
variant: "h6"
|
|
149
|
-
}, "Thank you!"), /*#__PURE__*/
|
|
149
|
+
}, "Thank you!"), /*#__PURE__*/React__default.createElement(Typography, null, "Your e-mail has been successfully sent!"))), showFailureMessage && /*#__PURE__*/React__default.createElement(Paper, {
|
|
150
150
|
sx: {
|
|
151
151
|
p: 2
|
|
152
152
|
}
|
|
153
|
-
}, /*#__PURE__*/
|
|
153
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
154
154
|
spacing: 2
|
|
155
|
-
}, /*#__PURE__*/
|
|
155
|
+
}, /*#__PURE__*/React__default.createElement(Typography, null, "I am sorry, something went wrong, you could email me directly on info@jellepaulus.nl"), /*#__PURE__*/React__default.createElement(Button, {
|
|
156
156
|
variant: "contained"
|
|
157
|
-
}, "try again")))), !showSuccessMessage && !showFailureMessage && /*#__PURE__*/
|
|
157
|
+
}, "try again")))), !showSuccessMessage && !showFailureMessage && /*#__PURE__*/React__default.createElement(Paper, {
|
|
158
158
|
sx: {
|
|
159
159
|
p: 2
|
|
160
160
|
}
|
|
161
|
-
}, /*#__PURE__*/
|
|
161
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
162
162
|
spacing: 2
|
|
163
|
-
}, /*#__PURE__*/
|
|
163
|
+
}, /*#__PURE__*/React__default.createElement(TextField, {
|
|
164
164
|
id: "name",
|
|
165
165
|
name: "name",
|
|
166
166
|
label: "Name",
|
|
@@ -170,7 +170,7 @@ function ContactForm(_ref) {
|
|
|
170
170
|
onChange: handleChange,
|
|
171
171
|
error: formErrors.name != undefined ? true : false,
|
|
172
172
|
helperText: formErrors.name
|
|
173
|
-
}), /*#__PURE__*/
|
|
173
|
+
}), /*#__PURE__*/React__default.createElement(TextField, {
|
|
174
174
|
id: "email",
|
|
175
175
|
name: "email",
|
|
176
176
|
label: "Email",
|
|
@@ -180,7 +180,7 @@ function ContactForm(_ref) {
|
|
|
180
180
|
onChange: handleChange,
|
|
181
181
|
error: formErrors.email != undefined ? true : false,
|
|
182
182
|
helperText: formErrors.email
|
|
183
|
-
}), /*#__PURE__*/
|
|
183
|
+
}), /*#__PURE__*/React__default.createElement(TextField, {
|
|
184
184
|
id: "subject",
|
|
185
185
|
name: "subject",
|
|
186
186
|
label: "Subject",
|
|
@@ -190,7 +190,7 @@ function ContactForm(_ref) {
|
|
|
190
190
|
onChange: handleChange,
|
|
191
191
|
error: formErrors.subject != undefined,
|
|
192
192
|
helperText: formErrors.subject
|
|
193
|
-
}), /*#__PURE__*/
|
|
193
|
+
}), /*#__PURE__*/React__default.createElement(TextField, {
|
|
194
194
|
id: "message",
|
|
195
195
|
name: "message",
|
|
196
196
|
label: "Message",
|
|
@@ -202,15 +202,15 @@ function ContactForm(_ref) {
|
|
|
202
202
|
onChange: handleChange,
|
|
203
203
|
error: formErrors.message != undefined,
|
|
204
204
|
helperText: formErrors.message
|
|
205
|
-
}), /*#__PURE__*/
|
|
205
|
+
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
206
206
|
direction: "row",
|
|
207
207
|
spacing: 2,
|
|
208
208
|
justifyContent: "end"
|
|
209
|
-
}, /*#__PURE__*/
|
|
209
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
210
210
|
variant: "outlined",
|
|
211
211
|
color: "primary",
|
|
212
212
|
onClick: handleClear
|
|
213
|
-
}, "Clear"), /*#__PURE__*/
|
|
213
|
+
}, "Clear"), /*#__PURE__*/React__default.createElement(Button, {
|
|
214
214
|
variant: "contained",
|
|
215
215
|
onClick: handleSubmit
|
|
216
216
|
}, "Send")))));
|