umwd-components 0.1.33 → 0.1.35
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/ContactForm.js +49 -0
- package/dist/cjs/components/Page.js +14 -3
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/ContactForm.js +45 -0
- package/dist/esm/components/Page.js +14 -3
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
- package/src/components/ContactForm.js +32 -0
- package/src/components/Page.js +20 -9
- package/src/index.js +1 -0
- package/src/stories/ContactForm.stories.js +13 -0
- package/src/stories/Page.stories.js +7 -6
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
require('prop-types');
|
|
14
|
+
var material = require('@mui/material');
|
|
15
|
+
|
|
16
|
+
function ContactForm({
|
|
17
|
+
...args
|
|
18
|
+
}) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(material.Stack, {
|
|
20
|
+
spacing: 2
|
|
21
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
22
|
+
variant: "h6",
|
|
23
|
+
align: "center"
|
|
24
|
+
}, "Write us"), /*#__PURE__*/React.createElement(material.Typography, {
|
|
25
|
+
variant: "body1",
|
|
26
|
+
align: "center"
|
|
27
|
+
}, "We're open for any suggestion or just to have a chat"), /*#__PURE__*/React.createElement(material.TextField, {
|
|
28
|
+
id: "name",
|
|
29
|
+
label: "Name",
|
|
30
|
+
variant: "outlined"
|
|
31
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
32
|
+
id: "email",
|
|
33
|
+
label: "Email",
|
|
34
|
+
variant: "outlined"
|
|
35
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
36
|
+
id: "subject",
|
|
37
|
+
label: "Subject",
|
|
38
|
+
variant: "outlined"
|
|
39
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
40
|
+
id: "message",
|
|
41
|
+
label: "Message",
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
multiline: true,
|
|
44
|
+
minRows: 5
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
ContactForm.propTypes = {};
|
|
48
|
+
|
|
49
|
+
exports.default = ContactForm;
|
|
@@ -12,22 +12,33 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var TextImageBlock = require('./TextImageBlock.js');
|
|
15
|
+
var material = require('@mui/material');
|
|
15
16
|
|
|
16
17
|
function Page({
|
|
18
|
+
page_title,
|
|
19
|
+
page_description,
|
|
17
20
|
page_blocks
|
|
18
21
|
}) {
|
|
19
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
20
|
-
|
|
22
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(material.Typography, {
|
|
23
|
+
variant: "h1",
|
|
24
|
+
align: "center"
|
|
25
|
+
}, page_title), /*#__PURE__*/React.createElement(material.Typography, {
|
|
26
|
+
variant: "h6",
|
|
27
|
+
align: "center"
|
|
28
|
+
}, page_description), page_blocks.map((block, index) => {
|
|
29
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextImageBlock.default, {
|
|
21
30
|
key: index,
|
|
22
31
|
block_title: block.block_title,
|
|
23
32
|
text_content: block.text_content,
|
|
24
33
|
image_content: block.image_content,
|
|
25
34
|
reverse: block.reverse,
|
|
26
35
|
maxWidth: block.maxWidth
|
|
27
|
-
});
|
|
36
|
+
}));
|
|
28
37
|
}));
|
|
29
38
|
}
|
|
30
39
|
Page.propTypes = {
|
|
40
|
+
page_title: PropTypes.string,
|
|
41
|
+
page_description: PropTypes.string,
|
|
31
42
|
page_blocks: PropTypes.arrayOf(PropTypes.shape({
|
|
32
43
|
block_title: PropTypes.string,
|
|
33
44
|
text_content: PropTypes.string,
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var NavBar = require('./components/NavBar.js');
|
|
|
14
14
|
var TextImageBlock = require('./components/TextImageBlock.js');
|
|
15
15
|
var Page = require('./components/Page.js');
|
|
16
16
|
var Footer = require('./components/Footer.js');
|
|
17
|
+
var ContactForm = require('./components/ContactForm.js');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -25,3 +26,4 @@ exports.NavBar = NavBar.default;
|
|
|
25
26
|
exports.TextImageBlock = TextImageBlock.default;
|
|
26
27
|
exports.Page = Page.default;
|
|
27
28
|
exports.Footer = Footer.default;
|
|
29
|
+
exports.ContactForm = ContactForm.default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import 'prop-types';
|
|
10
|
+
import { Stack, Typography, TextField } from '@mui/material';
|
|
11
|
+
|
|
12
|
+
function ContactForm({
|
|
13
|
+
...args
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
16
|
+
spacing: 2
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
18
|
+
variant: "h6",
|
|
19
|
+
align: "center"
|
|
20
|
+
}, "Write us"), /*#__PURE__*/React.createElement(Typography, {
|
|
21
|
+
variant: "body1",
|
|
22
|
+
align: "center"
|
|
23
|
+
}, "We're open for any suggestion or just to have a chat"), /*#__PURE__*/React.createElement(TextField, {
|
|
24
|
+
id: "name",
|
|
25
|
+
label: "Name",
|
|
26
|
+
variant: "outlined"
|
|
27
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
28
|
+
id: "email",
|
|
29
|
+
label: "Email",
|
|
30
|
+
variant: "outlined"
|
|
31
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
32
|
+
id: "subject",
|
|
33
|
+
label: "Subject",
|
|
34
|
+
variant: "outlined"
|
|
35
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
36
|
+
id: "message",
|
|
37
|
+
label: "Message",
|
|
38
|
+
variant: "outlined",
|
|
39
|
+
multiline: true,
|
|
40
|
+
minRows: 5
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
ContactForm.propTypes = {};
|
|
44
|
+
|
|
45
|
+
export { ContactForm as default };
|
|
@@ -8,22 +8,33 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import TextImageBlock from './TextImageBlock.js';
|
|
11
|
+
import { Typography } from '@mui/material';
|
|
11
12
|
|
|
12
13
|
function Page({
|
|
14
|
+
page_title,
|
|
15
|
+
page_description,
|
|
13
16
|
page_blocks
|
|
14
17
|
}) {
|
|
15
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
16
|
-
|
|
18
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, {
|
|
19
|
+
variant: "h1",
|
|
20
|
+
align: "center"
|
|
21
|
+
}, page_title), /*#__PURE__*/React.createElement(Typography, {
|
|
22
|
+
variant: "h6",
|
|
23
|
+
align: "center"
|
|
24
|
+
}, page_description), page_blocks.map((block, index) => {
|
|
25
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextImageBlock, {
|
|
17
26
|
key: index,
|
|
18
27
|
block_title: block.block_title,
|
|
19
28
|
text_content: block.text_content,
|
|
20
29
|
image_content: block.image_content,
|
|
21
30
|
reverse: block.reverse,
|
|
22
31
|
maxWidth: block.maxWidth
|
|
23
|
-
});
|
|
32
|
+
}));
|
|
24
33
|
}));
|
|
25
34
|
}
|
|
26
35
|
Page.propTypes = {
|
|
36
|
+
page_title: PropTypes.string,
|
|
37
|
+
page_description: PropTypes.string,
|
|
27
38
|
page_blocks: PropTypes.arrayOf(PropTypes.shape({
|
|
28
39
|
block_title: PropTypes.string,
|
|
29
40
|
text_content: PropTypes.string,
|
package/dist/esm/index.js
CHANGED
|
@@ -12,3 +12,4 @@ export { default as NavBar } from './components/NavBar.js';
|
|
|
12
12
|
export { default as TextImageBlock } from './components/TextImageBlock.js';
|
|
13
13
|
export { default as Page } from './components/Page.js';
|
|
14
14
|
export { default as Footer } from './components/Footer.js';
|
|
15
|
+
export { default as ContactForm } from './components/ContactForm.js';
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import { TextField, Typography, Stack } from "@mui/material";
|
|
6
|
+
|
|
7
|
+
function ContactForm({ ...args }) {
|
|
8
|
+
return (
|
|
9
|
+
<Stack spacing={2}>
|
|
10
|
+
<Typography variant="h6" align="center">
|
|
11
|
+
Write us
|
|
12
|
+
</Typography>
|
|
13
|
+
<Typography variant="body1" align="center">
|
|
14
|
+
We're open for any suggestion or just to have a chat
|
|
15
|
+
</Typography>
|
|
16
|
+
<TextField id="name" label="Name" variant="outlined" />
|
|
17
|
+
<TextField id="email" label="Email" variant="outlined" />
|
|
18
|
+
<TextField id="subject" label="Subject" variant="outlined" />
|
|
19
|
+
<TextField
|
|
20
|
+
id="message"
|
|
21
|
+
label="Message"
|
|
22
|
+
variant="outlined"
|
|
23
|
+
multiline
|
|
24
|
+
minRows={5}
|
|
25
|
+
/>
|
|
26
|
+
</Stack>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ContactForm.propTypes = {};
|
|
31
|
+
|
|
32
|
+
export default ContactForm;
|
package/src/components/Page.js
CHANGED
|
@@ -3,20 +3,29 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import TextImageBlock from "./TextImageBlock";
|
|
6
|
+
import { Typography } from "@mui/material";
|
|
6
7
|
|
|
7
|
-
function Page({ page_blocks }) {
|
|
8
|
+
function Page({ page_title, page_description, page_blocks }) {
|
|
8
9
|
return (
|
|
9
10
|
<>
|
|
11
|
+
<Typography variant="h1" align="center">
|
|
12
|
+
{page_title}
|
|
13
|
+
</Typography>
|
|
14
|
+
<Typography variant="h6" align="center">
|
|
15
|
+
{page_description}
|
|
16
|
+
</Typography>
|
|
10
17
|
{page_blocks.map((block, index) => {
|
|
11
18
|
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
<>
|
|
20
|
+
<TextImageBlock
|
|
21
|
+
key={index}
|
|
22
|
+
block_title={block.block_title}
|
|
23
|
+
text_content={block.text_content}
|
|
24
|
+
image_content={block.image_content}
|
|
25
|
+
reverse={block.reverse}
|
|
26
|
+
maxWidth={block.maxWidth}
|
|
27
|
+
/>
|
|
28
|
+
</>
|
|
20
29
|
);
|
|
21
30
|
})}
|
|
22
31
|
</>
|
|
@@ -24,6 +33,8 @@ function Page({ page_blocks }) {
|
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
Page.propTypes = {
|
|
36
|
+
page_title: PropTypes.string,
|
|
37
|
+
page_description: PropTypes.string,
|
|
27
38
|
page_blocks: PropTypes.arrayOf(
|
|
28
39
|
PropTypes.shape({
|
|
29
40
|
block_title: PropTypes.string,
|
package/src/index.js
CHANGED
|
@@ -7,3 +7,4 @@ export { default as NavBar } from "./components/NavBar";
|
|
|
7
7
|
export { default as TextImageBlock } from "./components/TextImageBlock";
|
|
8
8
|
export { default as Page } from "./components/Page";
|
|
9
9
|
export { default as Footer } from "./components/Footer";
|
|
10
|
+
export { default as ContactForm } from "./components/ContactForm";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ContactForm from "../components/ContactForm";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "UMWD/ContactForm",
|
|
6
|
+
component: ContactForm,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = ({ ...args }) => <ContactForm />;
|
|
10
|
+
|
|
11
|
+
export const HelloWorld = Template.bind({});
|
|
12
|
+
|
|
13
|
+
HelloWorld.args = {};
|
|
@@ -8,17 +8,18 @@ export default {
|
|
|
8
8
|
// argTypes: { numberOfChildren: { type: "number" } },
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
const Template = ({ blocks, ...args }) => (
|
|
12
|
-
<Page
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const Template = ({ page_title, page_description, blocks, ...args }) => (
|
|
12
|
+
<Page
|
|
13
|
+
page_title={page_title}
|
|
14
|
+
page_description={page_description}
|
|
15
|
+
page_blocks={blocks}
|
|
16
|
+
/>
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
export const HelloWorld = Template.bind({});
|
|
20
20
|
|
|
21
21
|
HelloWorld.args = {
|
|
22
|
+
page_title: "Hello Cruel World",
|
|
22
23
|
blocks: [
|
|
23
24
|
{
|
|
24
25
|
block_title: "Hello World",
|