umwd-components 0.1.24 → 0.1.26
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/Page.js +7 -1
- package/dist/cjs/components/TextImageBlock.js +17 -11
- package/dist/esm/components/Page.js +7 -1
- package/dist/esm/components/TextImageBlock.js +17 -11
- package/package.json +1 -1
- package/src/components/Page.js +9 -1
- package/src/components/TextImageBlock.js +15 -9
|
@@ -28,7 +28,13 @@ function Page({
|
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
Page.propTypes = {
|
|
31
|
-
page_blocks: PropTypes.
|
|
31
|
+
page_blocks: PropTypes.arrayOf(PropTypes.shape({
|
|
32
|
+
block_title: PropTypes.string,
|
|
33
|
+
text_content: PropTypes.string,
|
|
34
|
+
image_content: PropTypes.string,
|
|
35
|
+
reverse: PropTypes.bool,
|
|
36
|
+
maxWidth: PropTypes.string
|
|
37
|
+
}))
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
exports.default = Page;
|
|
@@ -32,7 +32,7 @@ function TextImageBlock({
|
|
|
32
32
|
}, text_content === undefined && {
|
|
33
33
|
display: "grid",
|
|
34
34
|
alignItems: "center",
|
|
35
|
-
|
|
35
|
+
justifyContent: "center"
|
|
36
36
|
}]
|
|
37
37
|
}, block_title && /*#__PURE__*/React.createElement(material.Grid, {
|
|
38
38
|
item: true,
|
|
@@ -41,32 +41,35 @@ function TextImageBlock({
|
|
|
41
41
|
p: 1,
|
|
42
42
|
display: "grid",
|
|
43
43
|
alignItems: "center",
|
|
44
|
-
|
|
44
|
+
justifyContent: "center"
|
|
45
45
|
}
|
|
46
46
|
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
47
47
|
variant: "h1"
|
|
48
48
|
}, block_title)), reverse ? /*#__PURE__*/React.createElement(React.Fragment, null, image_content?.url !== undefined && /*#__PURE__*/React.createElement(material.Grid, {
|
|
49
49
|
item: true,
|
|
50
|
-
xs: 6,
|
|
50
|
+
xs: text_content !== null && text_content !== undefined ? 6 : 12,
|
|
51
51
|
sx: {
|
|
52
52
|
padding: "10px",
|
|
53
53
|
minHeight: "100vh",
|
|
54
54
|
display: "grid",
|
|
55
55
|
alignItems: "center",
|
|
56
|
-
|
|
56
|
+
justifyContent: "center"
|
|
57
57
|
}
|
|
58
58
|
}, /*#__PURE__*/React.createElement(material.Box, {
|
|
59
59
|
sx: {
|
|
60
60
|
width: "100%",
|
|
61
61
|
height: "100%",
|
|
62
|
-
overflow: "hidden"
|
|
62
|
+
overflow: "hidden",
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
justifyContent: "center"
|
|
63
66
|
}
|
|
64
67
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
65
68
|
src: image_content.url,
|
|
66
69
|
width: image_content.width,
|
|
67
70
|
height: image_content.height,
|
|
68
71
|
alt: image_content.name
|
|
69
|
-
}))), text_content && /*#__PURE__*/React.createElement(material.Grid, {
|
|
72
|
+
}))), text_content !== null && text_content !== undefined && /*#__PURE__*/React.createElement(material.Grid, {
|
|
70
73
|
item: true,
|
|
71
74
|
xs: image_content?.url !== undefined ? 6 : 12,
|
|
72
75
|
sx: {
|
|
@@ -74,7 +77,7 @@ function TextImageBlock({
|
|
|
74
77
|
minHeight: "100vh",
|
|
75
78
|
display: "grid",
|
|
76
79
|
alignItems: "center",
|
|
77
|
-
|
|
80
|
+
justifyContent: "center"
|
|
78
81
|
}
|
|
79
82
|
}, /*#__PURE__*/React.createElement(muiMarkdown.MuiMarkdown, null, text_content))) : /*#__PURE__*/React.createElement(React.Fragment, null, text_content && /*#__PURE__*/React.createElement(material.Grid, {
|
|
80
83
|
item: true,
|
|
@@ -84,23 +87,26 @@ function TextImageBlock({
|
|
|
84
87
|
minHeight: "100vh",
|
|
85
88
|
display: "grid",
|
|
86
89
|
alignItems: "center",
|
|
87
|
-
|
|
90
|
+
justifyContent: "center"
|
|
88
91
|
}
|
|
89
92
|
}, /*#__PURE__*/React.createElement(muiMarkdown.MuiMarkdown, null, text_content)), image_content?.url !== undefined && /*#__PURE__*/React.createElement(material.Grid, {
|
|
90
93
|
item: true,
|
|
91
|
-
xs: 6,
|
|
94
|
+
xs: text_content !== null && text_content !== undefined ? 6 : 12,
|
|
92
95
|
sx: {
|
|
93
96
|
padding: "10px",
|
|
94
97
|
minHeight: "100vh",
|
|
95
98
|
display: "grid",
|
|
96
99
|
alignItems: "center",
|
|
97
|
-
|
|
100
|
+
justifyContent: "center"
|
|
98
101
|
}
|
|
99
102
|
}, /*#__PURE__*/React.createElement(material.Box, {
|
|
100
103
|
sx: {
|
|
101
104
|
width: "100%",
|
|
102
105
|
height: "100%",
|
|
103
|
-
overflow: "hidden"
|
|
106
|
+
overflow: "hidden",
|
|
107
|
+
display: "flex",
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
justifyContent: "center"
|
|
104
110
|
}
|
|
105
111
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
106
112
|
src: image_content.url,
|
|
@@ -24,7 +24,13 @@ function Page({
|
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
26
26
|
Page.propTypes = {
|
|
27
|
-
page_blocks: PropTypes.
|
|
27
|
+
page_blocks: PropTypes.arrayOf(PropTypes.shape({
|
|
28
|
+
block_title: PropTypes.string,
|
|
29
|
+
text_content: PropTypes.string,
|
|
30
|
+
image_content: PropTypes.string,
|
|
31
|
+
reverse: PropTypes.bool,
|
|
32
|
+
maxWidth: PropTypes.string
|
|
33
|
+
}))
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
export { Page as default };
|
|
@@ -28,7 +28,7 @@ function TextImageBlock({
|
|
|
28
28
|
}, text_content === undefined && {
|
|
29
29
|
display: "grid",
|
|
30
30
|
alignItems: "center",
|
|
31
|
-
|
|
31
|
+
justifyContent: "center"
|
|
32
32
|
}]
|
|
33
33
|
}, block_title && /*#__PURE__*/React.createElement(Grid, {
|
|
34
34
|
item: true,
|
|
@@ -37,32 +37,35 @@ function TextImageBlock({
|
|
|
37
37
|
p: 1,
|
|
38
38
|
display: "grid",
|
|
39
39
|
alignItems: "center",
|
|
40
|
-
|
|
40
|
+
justifyContent: "center"
|
|
41
41
|
}
|
|
42
42
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
43
43
|
variant: "h1"
|
|
44
44
|
}, block_title)), reverse ? /*#__PURE__*/React.createElement(React.Fragment, null, image_content?.url !== undefined && /*#__PURE__*/React.createElement(Grid, {
|
|
45
45
|
item: true,
|
|
46
|
-
xs: 6,
|
|
46
|
+
xs: text_content !== null && text_content !== undefined ? 6 : 12,
|
|
47
47
|
sx: {
|
|
48
48
|
padding: "10px",
|
|
49
49
|
minHeight: "100vh",
|
|
50
50
|
display: "grid",
|
|
51
51
|
alignItems: "center",
|
|
52
|
-
|
|
52
|
+
justifyContent: "center"
|
|
53
53
|
}
|
|
54
54
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
55
55
|
sx: {
|
|
56
56
|
width: "100%",
|
|
57
57
|
height: "100%",
|
|
58
|
-
overflow: "hidden"
|
|
58
|
+
overflow: "hidden",
|
|
59
|
+
display: "flex",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
justifyContent: "center"
|
|
59
62
|
}
|
|
60
63
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
61
64
|
src: image_content.url,
|
|
62
65
|
width: image_content.width,
|
|
63
66
|
height: image_content.height,
|
|
64
67
|
alt: image_content.name
|
|
65
|
-
}))), text_content && /*#__PURE__*/React.createElement(Grid, {
|
|
68
|
+
}))), text_content !== null && text_content !== undefined && /*#__PURE__*/React.createElement(Grid, {
|
|
66
69
|
item: true,
|
|
67
70
|
xs: image_content?.url !== undefined ? 6 : 12,
|
|
68
71
|
sx: {
|
|
@@ -70,7 +73,7 @@ function TextImageBlock({
|
|
|
70
73
|
minHeight: "100vh",
|
|
71
74
|
display: "grid",
|
|
72
75
|
alignItems: "center",
|
|
73
|
-
|
|
76
|
+
justifyContent: "center"
|
|
74
77
|
}
|
|
75
78
|
}, /*#__PURE__*/React.createElement(MuiMarkdown, null, text_content))) : /*#__PURE__*/React.createElement(React.Fragment, null, text_content && /*#__PURE__*/React.createElement(Grid, {
|
|
76
79
|
item: true,
|
|
@@ -80,23 +83,26 @@ function TextImageBlock({
|
|
|
80
83
|
minHeight: "100vh",
|
|
81
84
|
display: "grid",
|
|
82
85
|
alignItems: "center",
|
|
83
|
-
|
|
86
|
+
justifyContent: "center"
|
|
84
87
|
}
|
|
85
88
|
}, /*#__PURE__*/React.createElement(MuiMarkdown, null, text_content)), image_content?.url !== undefined && /*#__PURE__*/React.createElement(Grid, {
|
|
86
89
|
item: true,
|
|
87
|
-
xs: 6,
|
|
90
|
+
xs: text_content !== null && text_content !== undefined ? 6 : 12,
|
|
88
91
|
sx: {
|
|
89
92
|
padding: "10px",
|
|
90
93
|
minHeight: "100vh",
|
|
91
94
|
display: "grid",
|
|
92
95
|
alignItems: "center",
|
|
93
|
-
|
|
96
|
+
justifyContent: "center"
|
|
94
97
|
}
|
|
95
98
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
96
99
|
sx: {
|
|
97
100
|
width: "100%",
|
|
98
101
|
height: "100%",
|
|
99
|
-
overflow: "hidden"
|
|
102
|
+
overflow: "hidden",
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center"
|
|
100
106
|
}
|
|
101
107
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
102
108
|
src: image_content.url,
|
package/package.json
CHANGED
package/src/components/Page.js
CHANGED
|
@@ -24,7 +24,15 @@ function Page({ page_blocks }) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
Page.propTypes = {
|
|
27
|
-
page_blocks: PropTypes.
|
|
27
|
+
page_blocks: PropTypes.arrayOf(
|
|
28
|
+
PropTypes.shape({
|
|
29
|
+
block_title: PropTypes.string,
|
|
30
|
+
text_content: PropTypes.string,
|
|
31
|
+
image_content: PropTypes.string,
|
|
32
|
+
reverse: PropTypes.bool,
|
|
33
|
+
maxWidth: PropTypes.string,
|
|
34
|
+
})
|
|
35
|
+
),
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
export default Page;
|
|
@@ -25,7 +25,7 @@ function TextImageBlock({
|
|
|
25
25
|
text_content === undefined && {
|
|
26
26
|
display: "grid",
|
|
27
27
|
alignItems: "center",
|
|
28
|
-
|
|
28
|
+
justifyContent: "center",
|
|
29
29
|
},
|
|
30
30
|
]}
|
|
31
31
|
>
|
|
@@ -37,7 +37,7 @@ function TextImageBlock({
|
|
|
37
37
|
p: 1,
|
|
38
38
|
display: "grid",
|
|
39
39
|
alignItems: "center",
|
|
40
|
-
|
|
40
|
+
justifyContent: "center",
|
|
41
41
|
}}
|
|
42
42
|
>
|
|
43
43
|
<Typography variant="h1">{block_title}</Typography>
|
|
@@ -48,13 +48,13 @@ function TextImageBlock({
|
|
|
48
48
|
{image_content?.url !== undefined && (
|
|
49
49
|
<Grid
|
|
50
50
|
item
|
|
51
|
-
xs={6}
|
|
51
|
+
xs={text_content !== null && text_content !== undefined ? 6 : 12}
|
|
52
52
|
sx={{
|
|
53
53
|
padding: "10px",
|
|
54
54
|
minHeight: "100vh",
|
|
55
55
|
display: "grid",
|
|
56
56
|
alignItems: "center",
|
|
57
|
-
|
|
57
|
+
justifyContent: "center",
|
|
58
58
|
}}
|
|
59
59
|
>
|
|
60
60
|
<Box
|
|
@@ -62,6 +62,9 @@ function TextImageBlock({
|
|
|
62
62
|
width: "100%",
|
|
63
63
|
height: "100%",
|
|
64
64
|
overflow: "hidden",
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
justifyContent: "center",
|
|
65
68
|
}}
|
|
66
69
|
>
|
|
67
70
|
<Image
|
|
@@ -73,7 +76,7 @@ function TextImageBlock({
|
|
|
73
76
|
</Box>
|
|
74
77
|
</Grid>
|
|
75
78
|
)}
|
|
76
|
-
{text_content && (
|
|
79
|
+
{text_content !== null && text_content !== undefined && (
|
|
77
80
|
<Grid
|
|
78
81
|
item
|
|
79
82
|
xs={image_content?.url !== undefined ? 6 : 12}
|
|
@@ -82,7 +85,7 @@ function TextImageBlock({
|
|
|
82
85
|
minHeight: "100vh",
|
|
83
86
|
display: "grid",
|
|
84
87
|
alignItems: "center",
|
|
85
|
-
|
|
88
|
+
justifyContent: "center",
|
|
86
89
|
}}
|
|
87
90
|
>
|
|
88
91
|
<MuiMarkdown>{text_content}</MuiMarkdown>
|
|
@@ -100,7 +103,7 @@ function TextImageBlock({
|
|
|
100
103
|
minHeight: "100vh",
|
|
101
104
|
display: "grid",
|
|
102
105
|
alignItems: "center",
|
|
103
|
-
|
|
106
|
+
justifyContent: "center",
|
|
104
107
|
}}
|
|
105
108
|
>
|
|
106
109
|
<MuiMarkdown>{text_content}</MuiMarkdown>
|
|
@@ -109,13 +112,13 @@ function TextImageBlock({
|
|
|
109
112
|
{image_content?.url !== undefined && (
|
|
110
113
|
<Grid
|
|
111
114
|
item
|
|
112
|
-
xs={6}
|
|
115
|
+
xs={text_content !== null && text_content !== undefined ? 6 : 12}
|
|
113
116
|
sx={{
|
|
114
117
|
padding: "10px",
|
|
115
118
|
minHeight: "100vh",
|
|
116
119
|
display: "grid",
|
|
117
120
|
alignItems: "center",
|
|
118
|
-
|
|
121
|
+
justifyContent: "center",
|
|
119
122
|
}}
|
|
120
123
|
>
|
|
121
124
|
<Box
|
|
@@ -123,6 +126,9 @@ function TextImageBlock({
|
|
|
123
126
|
width: "100%",
|
|
124
127
|
height: "100%",
|
|
125
128
|
overflow: "hidden",
|
|
129
|
+
display: "flex",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
justifyContent: "center",
|
|
126
132
|
}}
|
|
127
133
|
>
|
|
128
134
|
<Image
|