umwd-components 0.1.48 → 0.1.49
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/WebsitePlaceholder.js +3 -0
- package/dist/esm/components/WebsitePlaceholder.js +3 -0
- package/package.json +1 -1
- package/src/components/Card.js +28 -0
- package/src/components/ThreeUp.js +42 -0
- package/src/components/WebsitePlaceholder.js +11 -1
- package/src/stories/ThreeUp.stories.js +35 -0
|
@@ -18,6 +18,8 @@ function WebsitePlaceholder({
|
|
|
18
18
|
title,
|
|
19
19
|
announcement,
|
|
20
20
|
logo,
|
|
21
|
+
lmBackgroundUrl,
|
|
22
|
+
dmBackgroundUrl,
|
|
21
23
|
children
|
|
22
24
|
}) {
|
|
23
25
|
const theme = material.useTheme();
|
|
@@ -60,6 +62,7 @@ function WebsitePlaceholder({
|
|
|
60
62
|
justifyItems: "center",
|
|
61
63
|
alignItems: "center",
|
|
62
64
|
backgroundColor: theme.palette.primary.main,
|
|
65
|
+
backgroundImage: `url(${theme.palette.mode === "light" ? lmBackgroundUrl : dmBackgroundUrl})`,
|
|
63
66
|
height: "100vh",
|
|
64
67
|
maxHeight: "100vh",
|
|
65
68
|
width: "100vw",
|
|
@@ -14,6 +14,8 @@ function WebsitePlaceholder({
|
|
|
14
14
|
title,
|
|
15
15
|
announcement,
|
|
16
16
|
logo,
|
|
17
|
+
lmBackgroundUrl,
|
|
18
|
+
dmBackgroundUrl,
|
|
17
19
|
children
|
|
18
20
|
}) {
|
|
19
21
|
const theme = useTheme();
|
|
@@ -56,6 +58,7 @@ function WebsitePlaceholder({
|
|
|
56
58
|
justifyItems: "center",
|
|
57
59
|
alignItems: "center",
|
|
58
60
|
backgroundColor: theme.palette.primary.main,
|
|
61
|
+
backgroundImage: `url(${theme.palette.mode === "light" ? lmBackgroundUrl : dmBackgroundUrl})`,
|
|
59
62
|
height: "100vh",
|
|
60
63
|
maxHeight: "100vh",
|
|
61
64
|
width: "100vw",
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import { Button, Card as MuiCard } from "@mui/material";
|
|
6
|
+
import { CardActions, CardContent, CardHeader, CardMedia } from "@mui/material";
|
|
7
|
+
|
|
8
|
+
function Card({ title, subHeader, cardContent, cardLink }) {
|
|
9
|
+
return (
|
|
10
|
+
<MuiCard sx={{ width: "100%" }}>
|
|
11
|
+
<CardHeader title={title} subheader={subHeader}></CardHeader>
|
|
12
|
+
<CardContent>
|
|
13
|
+
{/* ToDo Parse MD*/}
|
|
14
|
+
{cardContent && cardContent}
|
|
15
|
+
</CardContent>
|
|
16
|
+
<CardMedia></CardMedia>
|
|
17
|
+
<CardActions>
|
|
18
|
+
{cardLink && <Button size="small">Learn More</Button>}
|
|
19
|
+
</CardActions>
|
|
20
|
+
</MuiCard>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Card.propTypes = {
|
|
25
|
+
title: PropTypes.string.isRequired,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default Card;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Card from "./Card";
|
|
5
|
+
import { Stack } from "@mui/material";
|
|
6
|
+
|
|
7
|
+
function ThreeUp({ card1, card2, card3 }) {
|
|
8
|
+
console.log("card1", card1);
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Stack direction={"row"} spacing={2} justifyContent={"space-between"}>
|
|
12
|
+
{card1 && (
|
|
13
|
+
<Card
|
|
14
|
+
title={card1.title}
|
|
15
|
+
subHeader={card1.subHeader}
|
|
16
|
+
cardContent={card1.cardContent}
|
|
17
|
+
cardLink={card1.cardLink}
|
|
18
|
+
/>
|
|
19
|
+
)}
|
|
20
|
+
{card2 && (
|
|
21
|
+
<Card
|
|
22
|
+
title={card2.title}
|
|
23
|
+
subHeader={card2.subHeader}
|
|
24
|
+
cardContent={card2.cardContent}
|
|
25
|
+
cardLink={card2.cardLink}
|
|
26
|
+
/>
|
|
27
|
+
)}
|
|
28
|
+
{card3 && (
|
|
29
|
+
<Card
|
|
30
|
+
title={card3.title}
|
|
31
|
+
subHeader={card3.subHeader}
|
|
32
|
+
cardContent={card3.cardContent}
|
|
33
|
+
cardLink={card3.cardLink}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
</Stack>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ThreeUp.propTypes = {};
|
|
41
|
+
|
|
42
|
+
export default ThreeUp;
|
|
@@ -5,7 +5,14 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import { Typography, Box, useTheme } from "@mui/material";
|
|
6
6
|
import Image from "next/image";
|
|
7
7
|
|
|
8
|
-
function WebsitePlaceholder({
|
|
8
|
+
function WebsitePlaceholder({
|
|
9
|
+
title,
|
|
10
|
+
announcement,
|
|
11
|
+
logo,
|
|
12
|
+
lmBackgroundUrl,
|
|
13
|
+
dmBackgroundUrl,
|
|
14
|
+
children,
|
|
15
|
+
}) {
|
|
9
16
|
const theme = useTheme();
|
|
10
17
|
|
|
11
18
|
// const [keysPressed, setKeysPressed] = React.useState({});
|
|
@@ -58,6 +65,9 @@ function WebsitePlaceholder({ title, announcement, logo, children }) {
|
|
|
58
65
|
justifyItems: "center",
|
|
59
66
|
alignItems: "center",
|
|
60
67
|
backgroundColor: theme.palette.primary.main,
|
|
68
|
+
backgroundImage: `url(${
|
|
69
|
+
theme.palette.mode === "light" ? lmBackgroundUrl : dmBackgroundUrl
|
|
70
|
+
})`,
|
|
61
71
|
height: "100vh",
|
|
62
72
|
maxHeight: "100vh",
|
|
63
73
|
width: "100vw",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import ThreeUp from "../components/ThreeUp";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "UMWD/ThreeUp",
|
|
6
|
+
component: ThreeUp,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = ({ card1, card2, card3, ...args }) => (
|
|
10
|
+
<ThreeUp card1={card1} card2={card2} card3={card3} />
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export const AMH = Template.bind({});
|
|
14
|
+
|
|
15
|
+
AMH.args = {
|
|
16
|
+
card1: { title: "Card 1" },
|
|
17
|
+
card2: { title: "Card 2" },
|
|
18
|
+
card3: { title: "Card 3" },
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const OREFS = Template.bind({});
|
|
22
|
+
|
|
23
|
+
OREFS.args = {
|
|
24
|
+
card1: { title: "Card 1" },
|
|
25
|
+
card2: { title: "Card 2" },
|
|
26
|
+
card3: { title: "Card 3" },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const UMWD = Template.bind({});
|
|
30
|
+
|
|
31
|
+
UMWD.args = {
|
|
32
|
+
card1: { title: "Card 1" },
|
|
33
|
+
card2: { title: "Card 2" },
|
|
34
|
+
card3: { title: "Card 3" },
|
|
35
|
+
};
|