umwd-components 0.1.22 → 0.1.24
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 +34 -0
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/Page.js +30 -0
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
- package/src/components/Page.js +30 -0
- package/src/index.js +1 -0
- package/src/stories/Page.stories.js +76 -0
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var PropTypes = require('prop-types');
|
|
14
|
+
var TextImageBlock = require('./TextImageBlock.js');
|
|
15
|
+
|
|
16
|
+
function Page({
|
|
17
|
+
page_blocks
|
|
18
|
+
}) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, page_blocks.map((block, index) => {
|
|
20
|
+
return /*#__PURE__*/React.createElement(TextImageBlock.default, {
|
|
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
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
Page.propTypes = {
|
|
31
|
+
page_blocks: PropTypes.array.isRequired
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.default = Page;
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var Button = require('./components/Button.js');
|
|
|
12
12
|
var Stack = require('./components/Stack.js');
|
|
13
13
|
var NavBar = require('./components/NavBar.js');
|
|
14
14
|
var TextImageBlock = require('./components/TextImageBlock.js');
|
|
15
|
+
var Page = require('./components/Page.js');
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
@@ -21,3 +22,4 @@ exports.Button = Button.default;
|
|
|
21
22
|
exports.Stack = Stack.default;
|
|
22
23
|
exports.NavBar = NavBar.default;
|
|
23
24
|
exports.TextImageBlock = TextImageBlock.default;
|
|
25
|
+
exports.Page = Page.default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import TextImageBlock from './TextImageBlock.js';
|
|
11
|
+
|
|
12
|
+
function Page({
|
|
13
|
+
page_blocks
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, page_blocks.map((block, index) => {
|
|
16
|
+
return /*#__PURE__*/React.createElement(TextImageBlock, {
|
|
17
|
+
key: index,
|
|
18
|
+
block_title: block.block_title,
|
|
19
|
+
text_content: block.text_content,
|
|
20
|
+
image_content: block.image_content,
|
|
21
|
+
reverse: block.reverse,
|
|
22
|
+
maxWidth: block.maxWidth
|
|
23
|
+
});
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
Page.propTypes = {
|
|
27
|
+
page_blocks: PropTypes.array.isRequired
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Page as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -10,3 +10,4 @@ export { default as Button } from './components/Button.js';
|
|
|
10
10
|
export { default as Stack } from './components/Stack.js';
|
|
11
11
|
export { default as NavBar } from './components/NavBar.js';
|
|
12
12
|
export { default as TextImageBlock } from './components/TextImageBlock.js';
|
|
13
|
+
export { default as Page } from './components/Page.js';
|
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import TextImageBlock from "./TextImageBlock";
|
|
6
|
+
|
|
7
|
+
function Page({ page_blocks }) {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
{page_blocks.map((block, index) => {
|
|
11
|
+
return (
|
|
12
|
+
<TextImageBlock
|
|
13
|
+
key={index}
|
|
14
|
+
block_title={block.block_title}
|
|
15
|
+
text_content={block.text_content}
|
|
16
|
+
image_content={block.image_content}
|
|
17
|
+
reverse={block.reverse}
|
|
18
|
+
maxWidth={block.maxWidth}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
})}
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Page.propTypes = {
|
|
27
|
+
page_blocks: PropTypes.array.isRequired,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default Page;
|
package/src/index.js
CHANGED
|
@@ -5,3 +5,4 @@ export { default as Button } from "./components/Button";
|
|
|
5
5
|
export { default as Stack } from "./components/Stack";
|
|
6
6
|
export { default as NavBar } from "./components/NavBar";
|
|
7
7
|
export { default as TextImageBlock } from "./components/TextImageBlock";
|
|
8
|
+
export { default as Page } from "./components/Page";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Page from "../components/Page";
|
|
2
|
+
import TextImageBlock from "../components/TextImageBlock";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "UMWD/Page",
|
|
7
|
+
component: Page,
|
|
8
|
+
// argTypes: { numberOfChildren: { type: "number" } },
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Template = ({ blocks, ...args }) => (
|
|
12
|
+
<Page page_blocks={blocks}>
|
|
13
|
+
{blocks.map((block, index) => (
|
|
14
|
+
<TextImageBlock />
|
|
15
|
+
))}
|
|
16
|
+
</Page>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export const HelloWorld = Template.bind({});
|
|
20
|
+
|
|
21
|
+
HelloWorld.args = {
|
|
22
|
+
blocks: [
|
|
23
|
+
{
|
|
24
|
+
block_title: "Hello World",
|
|
25
|
+
image_content: {
|
|
26
|
+
url: "https://via.placeholder.com/850",
|
|
27
|
+
width: 850,
|
|
28
|
+
height: 850,
|
|
29
|
+
alt: "Hello World",
|
|
30
|
+
},
|
|
31
|
+
text_content:
|
|
32
|
+
"## Hello World \n **Hello World,** a timeless greeting that transcends boundaries and encapsulates the essence of connectivity in the digital age. From the humble beginnings of computer programming to the interconnected web of today, Hello World stands as the inaugural utterance in the realm of coding. *Hello World,* a phrase that marks the inception of countless software projects, introducing developers to the syntax and structure of a programming language. It symbolizes the first step into a world of algorithms, data structures, and creative problem-solving. Beyond its technical significance, it embodies the spirit of initiation and the commencement of a journey into the vast landscape of software development. <br /> <br /> *Hello World,* a greeting echoed by computer science enthusiasts worldwide, reflecting the universality of technology and the shared experience of navigating the intricacies of code. It bridges the gap between novices and seasoned programmers, serving as a common ground where knowledge is exchanged, challenges are discussed, and innovations are born. <br /> <br /> In a broader context, *Hello World* extends beyond the confines of programming. It serves as a metaphor for embracing new beginnings, fostering connections, and acknowledging the vastness of our global community. In a world increasingly shaped by technology, this simple greeting remains a symbol of the interconnectedness that defines our modern existence.",
|
|
33
|
+
reverse: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
block_title: "Hello Mars",
|
|
37
|
+
image_content: {
|
|
38
|
+
url: "https://via.placeholder.com/1200",
|
|
39
|
+
width: 600,
|
|
40
|
+
height: 600,
|
|
41
|
+
alt: "Hello Mars",
|
|
42
|
+
},
|
|
43
|
+
text_content:
|
|
44
|
+
"**Hello Mars,** \n a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
45
|
+
reverse: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
image_content: {
|
|
49
|
+
url: "https://via.placeholder.com/150",
|
|
50
|
+
width: 150,
|
|
51
|
+
height: 150,
|
|
52
|
+
alt: "Hello Mars",
|
|
53
|
+
},
|
|
54
|
+
text_content:
|
|
55
|
+
"**Hello Mars,** \n a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. <br /> <br /> *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
56
|
+
reverse: false,
|
|
57
|
+
maxWidth: "900px",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
block_title: "Hello Mars",
|
|
61
|
+
text_content:
|
|
62
|
+
"## Hello Mars \n **Hello Mars,** a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. <br /> <br /> *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
63
|
+
reverse: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
block_title: "Hello Mars",
|
|
67
|
+
image_content: {
|
|
68
|
+
url: "https://via.placeholder.com/150",
|
|
69
|
+
width: 150,
|
|
70
|
+
height: 150,
|
|
71
|
+
alt: "Hello Mars",
|
|
72
|
+
},
|
|
73
|
+
reverse: true,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|