@universal-tennis/ui-shared 0.0.15 → 0.0.16
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/.storybook/main.js +1 -1
- package/.storybook/variables.css +3 -0
- package/dist/components.d.ts +4 -2
- package/dist/components.js +4 -2
- package/dist/components.js.map +1 -1
- package/dist/stories/assets/css/variables.css +3 -0
- package/dist/stories/atoms/Button/Button.js +1 -0
- package/dist/stories/atoms/Button/Button.js.map +1 -1
- package/dist/stories/molecules/Cards/Cards.stories.d.ts +6 -0
- package/dist/stories/molecules/Cards/Cards.stories.js +27 -0
- package/dist/stories/molecules/Cards/Cards.stories.js.map +1 -0
- package/dist/stories/molecules/Cards/ContactCard.d.ts +8 -0
- package/dist/stories/molecules/Cards/ContactCard.js +28 -0
- package/dist/stories/molecules/Cards/ContactCard.js.map +1 -0
- package/dist/stories/molecules/Cards/TeamCard.d.ts +7 -0
- package/dist/stories/molecules/Cards/TeamCard.js +21 -0
- package/dist/stories/molecules/Cards/TeamCard.js.map +1 -0
- package/dist/stories/molecules/Cards/shared.d.ts +9 -0
- package/dist/stories/molecules/Cards/shared.js +13 -0
- package/dist/stories/molecules/Cards/shared.js.map +1 -0
- package/package.json +1 -1
- package/src/components.jsx +5 -2
- package/src/stories/assets/css/variables.css +3 -0
- package/src/stories/atoms/Button/Button.tsx +1 -0
- package/src/stories/molecules/Cards/Cards.stories.tsx +44 -0
- package/src/stories/molecules/Cards/ContactCard.tsx +37 -0
- package/src/stories/molecules/Cards/TeamCard.tsx +20 -0
- package/src/stories/molecules/Cards/shared.tsx +14 -0
- package/tsconfig.json +1 -1
- package/dist/stories/atoms/Button/index.d.ts +0 -1
- package/dist/stories/atoms/Button/index.js +0 -2
- package/dist/stories/atoms/Button/index.js.map +0 -1
- package/dist/stories/atoms/Typography/index.d.ts +0 -1
- package/dist/stories/atoms/Typography/index.js +0 -2
- package/dist/stories/atoms/Typography/index.js.map +0 -1
- package/src/stories/atoms/Button/index.tsx +0 -1
- package/src/stories/atoms/Typography/index.tsx +0 -1
package/.storybook/main.js
CHANGED
package/.storybook/variables.css
CHANGED
package/dist/components.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { Button } from "./stories/atoms/Button";
|
|
2
|
-
export { Typography } from "./stories/atoms/Typography";
|
|
1
|
+
export { default as Button } from "./stories/atoms/Button/Button";
|
|
2
|
+
export { default as Typography } from "./stories/atoms/Typography/Typography";
|
|
3
|
+
export { default as ContactCard } from "./stories/molecules/Cards/ContactCard";
|
|
4
|
+
export { default as TeamCard } from "./stories/molecules/Cards/TeamCard";
|
package/dist/components.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// ATOMS
|
|
2
2
|
import "./stories/assets/css/variables.css";
|
|
3
|
-
export { Button } from './stories/atoms/Button';
|
|
4
|
-
export { Typography } from './stories/atoms/Typography';
|
|
3
|
+
export { default as Button } from './stories/atoms/Button/Button';
|
|
4
|
+
export { default as Typography } from './stories/atoms/Typography/Typography';
|
|
5
5
|
// MOLECULES
|
|
6
|
+
export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
|
|
7
|
+
export { default as TeamCard } from './stories/molecules/Cards/TeamCard';
|
|
6
8
|
// ORGANISMS
|
|
7
9
|
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAA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AE,cAAc;IAErB,SAAS,EAAE;QACT,WAAW,EAAE,qBAAqB;KACnC;IACD,YAAY,EAAE;QACZ,WAAW,EAAE,iBAAiB;KAC/B;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACnC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,aAAa;IAC9B,KAAK,EAAE,gBAAgB;IACvB,aAAa,EAAE,SAAS;IACxB,OAAO,EAAE,CAAC;IAEV,SAAS,EAAE;QACT,eAAe,EAAE,aAAa;KAC/B;IAED,YAAY,EAAE;QACZ,WAAW,EAAE,iBAAiB;KAC/B;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAA6C;QAA7C,EAAE,QAAQ,EAAE,QAAQ,OAAyB,EAApB,KAAK,cAA9B,wBAAgC,CAAF;IAC3D,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,aAAa,oBACR,KAAK,GAER,QAAQ,CACK,CACjB,CAAC;QACJ,KAAK,kBAAkB;YACrB,OAAO,CACH,oBAAC,aAAa,kBACZ,UAAU,UACN,KAAK,GAER,QAAQ,CACK,CACnB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,eAAe,oBACV,KAAK,GAER,QAAQ,CACO,CACnB,CAAC;QACJ,KAAK,MAAM;YACT,OAAO,CACH,oBAAC,UAAU,kBACT,kBAAkB,UACd,KAAK,GAER,QAAQ,CACE,CAChB,CAAC;QACJ;YACE,OAAO,CACH,oBAAC,YAAY,oBACP,KAAK,GAEV,QAAQ,CACM,CAClB,CAAC;KACL;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C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KAC/B;IAED,YAAY,EAAE;QACZ,WAAW,EAAE,iBAAiB;KAC/B;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAA6C;QAA7C,EAAE,QAAQ,EAAE,QAAQ,OAAyB,EAApB,KAAK,cAA9B,wBAAgC,CAAF;IAC3D,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,aAAa,oBACR,KAAK,GAER,QAAQ,CACK,CACjB,CAAC;QACJ,KAAK,kBAAkB;YACrB,OAAO,CACH,oBAAC,aAAa,kBACZ,UAAU,UACN,KAAK,GAER,QAAQ,CACK,CACnB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,eAAe,oBACV,KAAK,GAER,QAAQ,CACO,CACnB,CAAC;QACJ,KAAK,MAAM;YACT,OAAO,CACH,oBAAC,UAAU,kBACT,kBAAkB,UACd,KAAK,GAER,QAAQ,CACE,CAChB,CAAC;QACJ;YACE,OAAO,CACH,oBAAC,YAAY,oBACP,KAAK,GAEV,QAAQ,CACM,CAClB,CAAC;KACL;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ContactCard from './ContactCard';
|
|
3
|
+
import TeamCard from './TeamCard';
|
|
4
|
+
// Default
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/Cards',
|
|
7
|
+
};
|
|
8
|
+
// Templates
|
|
9
|
+
function ContactCardTemplate(args) {
|
|
10
|
+
return React.createElement(ContactCard, Object.assign({}, args));
|
|
11
|
+
}
|
|
12
|
+
function TeamCardTemplate(args) {
|
|
13
|
+
return React.createElement(TeamCard, Object.assign({}, args));
|
|
14
|
+
}
|
|
15
|
+
// Stories
|
|
16
|
+
export const Contact = ContactCardTemplate.bind({});
|
|
17
|
+
Contact.args = {
|
|
18
|
+
name: "Jessica Carson",
|
|
19
|
+
phone: "+1 222-234-4567",
|
|
20
|
+
email: "test@sample.com"
|
|
21
|
+
};
|
|
22
|
+
export const Team = TeamCardTemplate.bind({});
|
|
23
|
+
Team.args = {
|
|
24
|
+
title: 'team 1',
|
|
25
|
+
description: 'Captained by Lenny McDowell, Josh Palmer, and Michael Ballast. Requires a passcode for registration.'
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Cards.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cards.stories.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/Cards.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAclC,UAAU;AACV,eAAe;IACb,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,YAAY;AACZ,SAAS,mBAAmB,CAAC,IAAsB;IACjD,OAAO,oBAAC,WAAW,oBAAK,IAAI,EAAI,CAAC;AACnC,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAmB;IAC3C,OAAO,oBAAC,QAAQ,oBAAK,IAAI,EAAI,CAAC;AAChC,CAAC;AAED,UAAU;AACV,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,IAAI,CAAC,IAAI,GAAG;IACV,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,sGAAsG;CACpH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import Button from '../../atoms/Button/Button';
|
|
14
|
+
import Typography from '../../atoms/Typography/Typography';
|
|
15
|
+
import { StyledCard } from './shared';
|
|
16
|
+
export default function ContactCard(_a) {
|
|
17
|
+
var { name, phone, email } = _a, props = __rest(_a, ["name", "phone", "email"]);
|
|
18
|
+
const firstName = name.split(" ")[0];
|
|
19
|
+
return (React.createElement(StyledCard, Object.assign({}, props),
|
|
20
|
+
React.createElement(Typography, { category: "secondary", size: "medium-medium" }, name),
|
|
21
|
+
React.createElement(Button, { category: "link" },
|
|
22
|
+
React.createElement(Typography, { category: "secondary", size: "x-small-book" }, phone)),
|
|
23
|
+
React.createElement(Button, { category: "link" },
|
|
24
|
+
React.createElement(Typography, { category: "secondary", size: "x-small-book" }, email)),
|
|
25
|
+
React.createElement(Button, { category: "link" },
|
|
26
|
+
React.createElement(Typography, { category: "secondary", size: "x-small-book" }, `Message ${firstName}`))));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=ContactCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/ContactCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQtC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAEjB;QAFiB,EAClC,IAAI,EAAE,KAAK,EAAE,KAAK,OACD,EADM,KAAK,cADM,0BAEnC,CAD6B;IAE5B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAErC,OAAO,CACH,oBAAC,UAAU,oBACL,KAAK;QAET,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,eAAe,IAAE,IAAI,CAAc;QACzE,oBAAC,MAAM,IAAC,QAAQ,EAAC,MAAM;YACnB,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAAE,KAAK,CAAc,CACpE;QACT,oBAAC,MAAM,IAAC,QAAQ,EAAC,MAAM;YACnB,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAAE,KAAK,CAAc,CACpE;QACT,oBAAC,MAAM,IAAC,QAAQ,EAAC,MAAM;YACnB,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAC/C,WAAW,SAAS,EAAE,CACd,CACR,CACE,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import Typography from '../../atoms/Typography/Typography';
|
|
14
|
+
import { StyledCard } from './shared';
|
|
15
|
+
export default function TeamCard(_a) {
|
|
16
|
+
var { title, description } = _a, props = __rest(_a, ["title", "description"]);
|
|
17
|
+
return (React.createElement(StyledCard, Object.assign({}, props),
|
|
18
|
+
React.createElement(Typography, { category: "secondary", size: "medium-medium" }, title),
|
|
19
|
+
React.createElement(Typography, { category: "secondary", size: "x-small-book" }, description)));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=TeamCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/TeamCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAA+C;QAA/C,EAAE,KAAK,EAAE,WAAW,OAA2B,EAAtB,KAAK,cAA9B,wBAAgC,CAAF;IAC7D,OAAO,CACH,oBAAC,UAAU,oBACL,KAAK;QAET,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,eAAe,IAAE,KAAK,CAAc;QAC1E,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAAE,WAAW,CAAc,CACpE,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledCard: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
component?: import("react").ElementType<any> | undefined;
|
|
5
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
}, "ref" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "component" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
export const StyledCard = styled(Box)({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
borderRadius: '4px',
|
|
7
|
+
padding: '16px',
|
|
8
|
+
border: '1px solid var(--cool-grey-300)',
|
|
9
|
+
'&:hover': {
|
|
10
|
+
cursor: 'pointer'
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,gCAAgC;IAExC,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// ATOMS
|
|
2
2
|
import "./stories/assets/css/variables.css";
|
|
3
3
|
|
|
4
|
-
export { Button } from './stories/atoms/Button';
|
|
5
|
-
export { Typography } from './stories/atoms/Typography';
|
|
4
|
+
export { default as Button } from './stories/atoms/Button/Button';
|
|
5
|
+
export { default as Typography } from './stories/atoms/Typography/Typography';
|
|
6
6
|
|
|
7
7
|
// MOLECULES
|
|
8
|
+
export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
|
|
9
|
+
export { default as TeamCard } from './stories/molecules/Cards/TeamCard';
|
|
10
|
+
|
|
8
11
|
// ORGANISMS
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import ContactCard from './ContactCard';
|
|
4
|
+
import TeamCard from './TeamCard';
|
|
5
|
+
|
|
6
|
+
// Prop types
|
|
7
|
+
interface ContactCardProps {
|
|
8
|
+
name: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
email: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface TeamCardProps {
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Default
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Molecules/Cards',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Templates
|
|
24
|
+
function ContactCardTemplate(args: ContactCardProps) {
|
|
25
|
+
return <ContactCard {...args} />;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function TeamCardTemplate(args: TeamCardProps) {
|
|
29
|
+
return <TeamCard {...args} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Stories
|
|
33
|
+
export const Contact = ContactCardTemplate.bind({});
|
|
34
|
+
Contact.args = {
|
|
35
|
+
name: "Jessica Carson",
|
|
36
|
+
phone: "+1 222-234-4567",
|
|
37
|
+
email: "test@sample.com"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Team = TeamCardTemplate.bind({});
|
|
41
|
+
Team.args = {
|
|
42
|
+
title: 'team 1',
|
|
43
|
+
description: 'Captained by Lenny McDowell, Josh Palmer, and Michael Ballast. Requires a passcode for registration.'
|
|
44
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Button from '../../atoms/Button/Button';
|
|
4
|
+
import Typography from '../../atoms/Typography/Typography';
|
|
5
|
+
|
|
6
|
+
import { StyledCard } from './shared';
|
|
7
|
+
|
|
8
|
+
type ContactCardProps = {
|
|
9
|
+
name: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
email: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function ContactCard({
|
|
15
|
+
name, phone, email, ...props
|
|
16
|
+
}: ContactCardProps) {
|
|
17
|
+
const firstName = name.split(" ")[0];
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<StyledCard
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
<Typography category="secondary" size="medium-medium">{name}</Typography>
|
|
24
|
+
<Button category="link">
|
|
25
|
+
<Typography category="secondary" size="x-small-book">{phone}</Typography>
|
|
26
|
+
</Button>
|
|
27
|
+
<Button category="link">
|
|
28
|
+
<Typography category="secondary" size="x-small-book">{email}</Typography>
|
|
29
|
+
</Button>
|
|
30
|
+
<Button category="link">
|
|
31
|
+
<Typography category="secondary" size="x-small-book">
|
|
32
|
+
{`Message ${firstName}`}
|
|
33
|
+
</Typography>
|
|
34
|
+
</Button>
|
|
35
|
+
</StyledCard>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Typography from '../../atoms/Typography/Typography';
|
|
4
|
+
import { StyledCard } from './shared';
|
|
5
|
+
|
|
6
|
+
type TeamCardProps = {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function TeamCard({ title, description, ...props }: TeamCardProps) {
|
|
12
|
+
return (
|
|
13
|
+
<StyledCard
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<Typography category="secondary" size="medium-medium">{title}</Typography>
|
|
17
|
+
<Typography category="secondary" size="x-small-book">{description}</Typography>
|
|
18
|
+
</StyledCard>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
export const StyledCard = styled(Box)({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
borderRadius: '4px',
|
|
8
|
+
padding: '16px',
|
|
9
|
+
border: '1px solid var(--cool-grey-300)',
|
|
10
|
+
|
|
11
|
+
'&:hover': {
|
|
12
|
+
cursor: 'pointer'
|
|
13
|
+
},
|
|
14
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Typography } from './Typography';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Typography } from './Typography';
|