@thecb/components 3.7.0-beta.2 → 4.0.0
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/page.js +2 -0
- package/dist/index.cjs.js +170 -146
- package/package.json +2 -2
- package/src/components/atoms/alert/Alert.js +53 -35
- package/src/components/atoms/breadcrumb/Breadcrumb.js +4 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +2 -2
- package/src/components/atoms/checkbox/Checkbox.js +1 -0
- package/src/components/atoms/checkbox-list/CheckboxList.js +3 -1
- package/src/components/atoms/display-card/DisplayCard.js +4 -2
- package/src/components/atoms/dropdown/Dropdown.js +4 -4
- package/src/components/atoms/dropdown/Dropdown.stories.js +10 -33
- package/src/components/atoms/form-layouts/FormInput.js +7 -4
- package/src/components/atoms/form-layouts/FormLayouts.stories.js +5 -5
- package/src/components/atoms/hamburger-button/HamburgerButton.js +4 -3
- package/src/components/atoms/icons/AccountsIconSmall.js +6 -13
- package/src/components/atoms/icons/icons.stories.js +1 -1
- package/src/components/atoms/layouts/Box.styled.js +1 -0
- package/src/components/atoms/layouts/Cluster.styled.js +5 -1
- package/src/components/atoms/layouts/Sidebar.styled.js +7 -1
- package/src/components/atoms/radio-button/RadioButton.js +1 -0
- package/src/components/atoms/radio-button/RadioButton.stories.js +26 -61
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +1 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +10 -51
- package/src/components/molecules/editable-list/EditableList.js +11 -8
- package/src/components/molecules/nav-menu/NavMenuDesktop.js +2 -1
- package/src/components/molecules/nav-menu/NavMenuMobile.js +7 -1
- package/src/components/molecules/obligation/Obligation.js +9 -7
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +23 -23
- package/src/components/molecules/pagination/Pagination.js +20 -4
- package/src/components/molecules/radio-section/RadioSection.js +7 -3
- package/src/deprecated/components/radio-button/radio-button.js +5 -1
- package/src/deprecated/icons/IconInvalid.js +7 -31
- package/src/deprecated/icons/IconNeutral.js +5 -4
- package/src/deprecated/icons/IconValid.js +8 -33
- package/src/util/general.js +10 -1
- package/src/components/molecules/content/Content.js +0 -20
- package/src/components/molecules/content/Content.theme.js +0 -60
- package/src/components/molecules/content/blocks/accordion-block/AccordionBlock.js +0 -108
- package/src/components/molecules/content/blocks/accordion-block/index.js +0 -3
- package/src/components/molecules/content/blocks/article-block/ArticleBlock.js +0 -58
- package/src/components/molecules/content/blocks/article-block/index.js +0 -3
- package/src/components/molecules/content/blocks/attached-file-block/AttachedFileBlock.js +0 -60
- package/src/components/molecules/content/blocks/attached-file-block/index.js +0 -3
- package/src/components/molecules/content/blocks/featured-content-block/FeaturedContentBlock.js +0 -0
- package/src/components/molecules/content/blocks/featured-content-block/index.js +0 -0
- package/src/components/molecules/content/blocks/hero-block/HeroBlock.js +0 -54
- package/src/components/molecules/content/blocks/hero-block/index.js +0 -3
- package/src/components/molecules/content/blocks/highlight-block/HighlightBlock.js +0 -42
- package/src/components/molecules/content/blocks/highlight-block/index.js +0 -3
- package/src/components/molecules/content/blocks/index.js +0 -33
- package/src/components/molecules/content/blocks/info-block/InfoBlock.js +0 -15
- package/src/components/molecules/content/blocks/info-block/index.js +0 -3
- package/src/components/molecules/content/blocks/location-block/LocationBlock.js +0 -228
- package/src/components/molecules/content/blocks/location-block/index.js +0 -3
- package/src/components/molecules/content/blocks/related-links-block/RelatedLinksBlock.js +0 -35
- package/src/components/molecules/content/blocks/related-links-block/index.js +0 -3
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorBlock.js +0 -57
- package/src/components/molecules/content/blocks/screendoor-block/ScreendoorForm.styled.js +0 -314
- package/src/components/molecules/content/blocks/screendoor-block/index.js +0 -3
- package/src/components/molecules/content/blocks/tagline-block/TaglineBlock.js +0 -45
- package/src/components/molecules/content/blocks/tagline-block/index.js +0 -3
- package/src/components/molecules/content/blocks/task-block/TaskBlock.js +0 -40
- package/src/components/molecules/content/blocks/task-block/index.js +0 -3
- package/src/components/molecules/content/blocks/text-block/TextBlock.js +0 -40
- package/src/components/molecules/content/blocks/text-block/index.js +0 -3
- package/src/components/molecules/content/header/Header.js +0 -283
- package/src/components/molecules/content/header/Header.theme.js +0 -11
- package/src/components/molecules/content/header/index.js +0 -3
- package/src/components/molecules/content/index.js +0 -3
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Heading,
|
|
6
|
-
Paragraph,
|
|
7
|
-
CollapsibleSection,
|
|
8
|
-
ExternalLink,
|
|
9
|
-
Motion
|
|
10
|
-
} from "@thecb/components";
|
|
11
|
-
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
12
|
-
|
|
13
|
-
const AccordionBlock = ({
|
|
14
|
-
themeValues,
|
|
15
|
-
description = "",
|
|
16
|
-
title = "",
|
|
17
|
-
accordionItems
|
|
18
|
-
}) => {
|
|
19
|
-
console.log("desciprtion is", description);
|
|
20
|
-
console.log("accordion items are", accordionItems);
|
|
21
|
-
console.log("accordion link color", themeValues.linkColor);
|
|
22
|
-
console.log("theme values...", themeValues);
|
|
23
|
-
const [toggleKeyList, setToggleKeyList] = useState([]);
|
|
24
|
-
const handleCollapsibleSection = index => {
|
|
25
|
-
const newList = toggleKeyList.includes(index)
|
|
26
|
-
? toggleKeyList.filter(i => i !== index)
|
|
27
|
-
: [...toggleKeyList, index];
|
|
28
|
-
|
|
29
|
-
setToggleKeyList(newList);
|
|
30
|
-
};
|
|
31
|
-
const accordionTitle = (
|
|
32
|
-
<Box minWidth="93%" padding="16px">
|
|
33
|
-
<Heading variant="h6" color={themeValues.darkText}>
|
|
34
|
-
{title}
|
|
35
|
-
</Heading>
|
|
36
|
-
</Box>
|
|
37
|
-
);
|
|
38
|
-
const items = accordionItems.map((item, index) => {
|
|
39
|
-
return (
|
|
40
|
-
<Box padding="0" key={index}>
|
|
41
|
-
{item.url ? (
|
|
42
|
-
<li>
|
|
43
|
-
<ExternalLink to={item.url}>
|
|
44
|
-
<Paragraph
|
|
45
|
-
variant="p"
|
|
46
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
47
|
-
color={themeValues.linkColor}
|
|
48
|
-
>
|
|
49
|
-
{item.title}
|
|
50
|
-
</Paragraph>
|
|
51
|
-
</ExternalLink>
|
|
52
|
-
</li>
|
|
53
|
-
) : (
|
|
54
|
-
<li>
|
|
55
|
-
<Paragraph
|
|
56
|
-
variant="p"
|
|
57
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
58
|
-
color={themeValues.darkText}
|
|
59
|
-
>
|
|
60
|
-
{item.title}
|
|
61
|
-
</Paragraph>
|
|
62
|
-
</li>
|
|
63
|
-
)}
|
|
64
|
-
{item.description && (
|
|
65
|
-
<Box>
|
|
66
|
-
<Paragraph variant="pS" color={themeValues.darkText}>
|
|
67
|
-
{item.description}
|
|
68
|
-
</Paragraph>
|
|
69
|
-
</Box>
|
|
70
|
-
)}
|
|
71
|
-
</Box>
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
return (
|
|
75
|
-
<Box
|
|
76
|
-
background="white"
|
|
77
|
-
borderSize="2px"
|
|
78
|
-
borderColor="#cfd4de"
|
|
79
|
-
borderWidthOverride="0 0 2px 0"
|
|
80
|
-
minWidth="100%"
|
|
81
|
-
>
|
|
82
|
-
<CollapsibleSection
|
|
83
|
-
title={accordionTitle}
|
|
84
|
-
customTitle
|
|
85
|
-
toggleSection={() => handleCollapsibleSection(1)}
|
|
86
|
-
isOpen={!toggleKeyList.includes(1)}
|
|
87
|
-
>
|
|
88
|
-
<Motion
|
|
89
|
-
padding="0"
|
|
90
|
-
transition={{ duration: 0.3 }}
|
|
91
|
-
positionTransition
|
|
92
|
-
extraStyles={`transform-origin: 100% 0;`}
|
|
93
|
-
>
|
|
94
|
-
<Box padding="24px" background="#f6f6f9">
|
|
95
|
-
<Stack>{description}</Stack>
|
|
96
|
-
<ul>
|
|
97
|
-
<Box padding="0">
|
|
98
|
-
<Stack>{items}</Stack>
|
|
99
|
-
</Box>
|
|
100
|
-
</ul>
|
|
101
|
-
</Box>
|
|
102
|
-
</Motion>
|
|
103
|
-
</CollapsibleSection>
|
|
104
|
-
</Box>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export default AccordionBlock;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Stack, Heading, Paragraph } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const ArticleBlock = ({
|
|
5
|
-
themeValues,
|
|
6
|
-
description = "",
|
|
7
|
-
headline = "",
|
|
8
|
-
blockIndex,
|
|
9
|
-
variant = "placeholder",
|
|
10
|
-
useDarkText = false
|
|
11
|
-
}) => {
|
|
12
|
-
console.log("article themevalues", themeValues);
|
|
13
|
-
console.log("article description", description);
|
|
14
|
-
console.log("article headline", headline);
|
|
15
|
-
console.log("article variant", variant);
|
|
16
|
-
console.log("useDarkText", useDarkText);
|
|
17
|
-
const paragraphs =
|
|
18
|
-
description.raw.children?.map((string, index) => (
|
|
19
|
-
<Box padding="0">
|
|
20
|
-
<Paragraph
|
|
21
|
-
key={`paragraph-${index}`}
|
|
22
|
-
variant="pL"
|
|
23
|
-
color={themeValues.darkText}
|
|
24
|
-
>
|
|
25
|
-
{string?.children?.[0]?.text ?? ""}
|
|
26
|
-
</Paragraph>
|
|
27
|
-
</Box>
|
|
28
|
-
)) ?? [];
|
|
29
|
-
return (
|
|
30
|
-
<Box maxWidth="100%" minHeight="500px" padding="0">
|
|
31
|
-
<Stack childGap="24px">
|
|
32
|
-
<Box padding="0 32px">
|
|
33
|
-
<Stack childGap="1rem">
|
|
34
|
-
<Heading
|
|
35
|
-
variant="h3"
|
|
36
|
-
color={
|
|
37
|
-
blockIndex === 0 && !useDarkText
|
|
38
|
-
? themeValues.lightText
|
|
39
|
-
: themeValues.darkText
|
|
40
|
-
}
|
|
41
|
-
key="heading"
|
|
42
|
-
extraStyles={`margin-top: 16px;`}
|
|
43
|
-
>
|
|
44
|
-
{headline}
|
|
45
|
-
</Heading>
|
|
46
|
-
</Stack>
|
|
47
|
-
</Box>
|
|
48
|
-
<Box padding="0">
|
|
49
|
-
<Box padding="24px 32px" background="white" borderRadius="4px">
|
|
50
|
-
<Stack>{paragraphs}</Stack>
|
|
51
|
-
</Box>
|
|
52
|
-
</Box>
|
|
53
|
-
</Stack>
|
|
54
|
-
</Box>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default ArticleBlock;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Cluster,
|
|
6
|
-
Paragraph,
|
|
7
|
-
ExternalLink
|
|
8
|
-
} from "@thecb/components";
|
|
9
|
-
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
10
|
-
import { IoIosArrowForward } from "react-icons/io";
|
|
11
|
-
|
|
12
|
-
const AttachedFileBlock = ({ fileName, fileType, file, themeValues }) => {
|
|
13
|
-
console.log("file is...", file);
|
|
14
|
-
return (
|
|
15
|
-
<Box
|
|
16
|
-
background="white"
|
|
17
|
-
minWidth="100%"
|
|
18
|
-
extraStyles={`margin-bottom: 2.5rem`}
|
|
19
|
-
padding="0"
|
|
20
|
-
>
|
|
21
|
-
<Stack childGap="24px">
|
|
22
|
-
<Paragraph key="title">Attached Files</Paragraph>
|
|
23
|
-
<ExternalLink href={`https://media.graphcms.com/${file.handle}`}>
|
|
24
|
-
<Box
|
|
25
|
-
padding="24px 16px 24px 24px"
|
|
26
|
-
background="white"
|
|
27
|
-
borderRadius="1px"
|
|
28
|
-
boxShadow={`inset 0px 3px 0px 0px ${themeValues.lightAccentText},
|
|
29
|
-
0px 1px 3px 0px rgba(0, 0, 0, 0.5)`}
|
|
30
|
-
key="file container"
|
|
31
|
-
minWidth={"100%"}
|
|
32
|
-
>
|
|
33
|
-
<Stack childGap="0.5rem">
|
|
34
|
-
<Paragraph
|
|
35
|
-
variant="pL"
|
|
36
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
37
|
-
color={themeValues.darkText}
|
|
38
|
-
>
|
|
39
|
-
{fileName}
|
|
40
|
-
</Paragraph>
|
|
41
|
-
<Box minWidth="100%" padding="0">
|
|
42
|
-
<Cluster justify="space-between" align="center">
|
|
43
|
-
<Paragraph color={themeValues.darkAccentText}>
|
|
44
|
-
{fileType}
|
|
45
|
-
</Paragraph>
|
|
46
|
-
<IoIosArrowForward
|
|
47
|
-
size="29px"
|
|
48
|
-
color={themeValues.linkColor}
|
|
49
|
-
/>
|
|
50
|
-
</Cluster>
|
|
51
|
-
</Box>
|
|
52
|
-
</Stack>
|
|
53
|
-
</Box>
|
|
54
|
-
</ExternalLink>
|
|
55
|
-
</Stack>
|
|
56
|
-
</Box>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default AttachedFileBlock;
|
package/src/components/molecules/content/blocks/featured-content-block/FeaturedContentBlock.js
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Stack,
|
|
5
|
-
Heading,
|
|
6
|
-
Paragraph,
|
|
7
|
-
Imposter,
|
|
8
|
-
ButtonWithLink
|
|
9
|
-
} from "@thecb/components";
|
|
10
|
-
|
|
11
|
-
const HeroBlock = ({
|
|
12
|
-
themeValues,
|
|
13
|
-
backgroundImage = { url: "" },
|
|
14
|
-
callToAction = "",
|
|
15
|
-
subTitle = "",
|
|
16
|
-
title = "",
|
|
17
|
-
link = ""
|
|
18
|
-
//variant = "placeholder",
|
|
19
|
-
//...rest
|
|
20
|
-
}) => {
|
|
21
|
-
const heroImageBG = `background: url(${backgroundImage.url}); background-size: cover;`;
|
|
22
|
-
return (
|
|
23
|
-
<Box minWidth="100%" minHeight="500px" extraStyles={heroImageBG}>
|
|
24
|
-
<Imposter
|
|
25
|
-
verticalMargin="32px"
|
|
26
|
-
left="48px"
|
|
27
|
-
breakout={false}
|
|
28
|
-
extraStyles={`transform: translate(0, -50%);`}
|
|
29
|
-
>
|
|
30
|
-
<Box
|
|
31
|
-
padding={"32px"}
|
|
32
|
-
minWidth="320px"
|
|
33
|
-
minHeight="360px"
|
|
34
|
-
maxWidth="320px"
|
|
35
|
-
background={themeValues.background}
|
|
36
|
-
>
|
|
37
|
-
<Stack childGap="16px">
|
|
38
|
-
<Fragment>
|
|
39
|
-
<Heading variant="h2" color={themeValues.lightAccentText}>
|
|
40
|
-
{title}
|
|
41
|
-
</Heading>
|
|
42
|
-
<Paragraph variant="pS" color={themeValues.lightText}>
|
|
43
|
-
{subTitle}
|
|
44
|
-
</Paragraph>
|
|
45
|
-
<ButtonWithLink variant="primary" text={callToAction} to={link} />
|
|
46
|
-
</Fragment>
|
|
47
|
-
</Stack>
|
|
48
|
-
</Box>
|
|
49
|
-
</Imposter>
|
|
50
|
-
</Box>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default HeroBlock;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Grid, Cluster, Heading, Paragraph } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const HighlightBlock = ({
|
|
5
|
-
themeValues,
|
|
6
|
-
highlightComponents = []
|
|
7
|
-
//variant = "placeholder"
|
|
8
|
-
}) => {
|
|
9
|
-
console.log("highlight components", highlightComponents);
|
|
10
|
-
const componentBlocks = highlightComponents.map(component => (
|
|
11
|
-
<Box padding="16px" key={component.title}>
|
|
12
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
13
|
-
<Box padding="16px">
|
|
14
|
-
<Box
|
|
15
|
-
padding="0"
|
|
16
|
-
borderRadius="50%"
|
|
17
|
-
extraStyles={`background-image: url(${component.image.url}); background-size: cover;`}
|
|
18
|
-
minHeight="124px"
|
|
19
|
-
minWidth="124px"
|
|
20
|
-
/>
|
|
21
|
-
</Box>
|
|
22
|
-
<Box padding="0" maxWidth="300px">
|
|
23
|
-
<Heading variant="h4" color={themeValues.lightAccentText}>
|
|
24
|
-
{component.title}
|
|
25
|
-
</Heading>
|
|
26
|
-
<Paragraph variant="pS" color={themeValues.lightText}>
|
|
27
|
-
{component.description}
|
|
28
|
-
</Paragraph>
|
|
29
|
-
</Box>
|
|
30
|
-
</Cluster>
|
|
31
|
-
</Box>
|
|
32
|
-
));
|
|
33
|
-
return (
|
|
34
|
-
<Box minWidth="100%" minHeight="500px" background={themeValues.background}>
|
|
35
|
-
<Grid columnGap="1px" minColWidth={"400px"}>
|
|
36
|
-
{componentBlocks}
|
|
37
|
-
</Grid>
|
|
38
|
-
</Box>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default HighlightBlock;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from "react";
|
|
2
|
-
import AccordionBlock from "./accordion-block";
|
|
3
|
-
import ArticleBlock from "./article-block";
|
|
4
|
-
import AttachedFileBlock from "./attached-file-block";
|
|
5
|
-
import HeroBlock from "./hero-block";
|
|
6
|
-
import HighlightBlock from "./highlight-block";
|
|
7
|
-
import InfoBlock from "./info-block";
|
|
8
|
-
import LocationBlock from "./location-block";
|
|
9
|
-
import RelatedLinksBlock from "./related-links-block";
|
|
10
|
-
import ScreendoorBlock from "./screendoor-block";
|
|
11
|
-
import TaglineBlock from "./tagline-block";
|
|
12
|
-
import TaskBlock from "./task-block";
|
|
13
|
-
import TextBlock from "./text-block";
|
|
14
|
-
|
|
15
|
-
export const blockRegistry = {
|
|
16
|
-
Accordion: props => <AccordionBlock {...props} />,
|
|
17
|
-
Article: props => <ArticleBlock {...props} />,
|
|
18
|
-
AttachedFile: props => <AttachedFileBlock {...props} />,
|
|
19
|
-
HeroContainer: props => <HeroBlock {...props} />,
|
|
20
|
-
Highlight: props => <HighlightBlock {...props} />,
|
|
21
|
-
InfoAlert: props => <InfoBlock {...props} />,
|
|
22
|
-
GetInTouch: props => <LocationBlock {...props} />,
|
|
23
|
-
Markdown: () => <Fragment />,
|
|
24
|
-
RelatedPages: props => <RelatedLinksBlock {...props} />,
|
|
25
|
-
ScreendoorForm: props => <ScreendoorBlock {...props} />,
|
|
26
|
-
Tagline: props => <TaglineBlock {...props} />,
|
|
27
|
-
Task: props => <TaskBlock {...props} />,
|
|
28
|
-
Text: props => <TextBlock {...props} />
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
TaglineBlock
|
|
33
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Alert } from "@thecb/components";
|
|
3
|
-
|
|
4
|
-
const InfoBlock = ({ heading, text }) => (
|
|
5
|
-
<Box
|
|
6
|
-
padding="0"
|
|
7
|
-
minWidth="100%"
|
|
8
|
-
maxWidth="330px"
|
|
9
|
-
extraStyles={`margin-bottom: 1rem;`}
|
|
10
|
-
>
|
|
11
|
-
<Alert heading={heading} text={text} variant="info" showQuitLink={false} />
|
|
12
|
-
</Box>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export default InfoBlock;
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
IoMdTime,
|
|
4
|
-
IoIosPin,
|
|
5
|
-
IoIosCall,
|
|
6
|
-
IoMdMail,
|
|
7
|
-
IoMdPrint,
|
|
8
|
-
IoLogoFacebook,
|
|
9
|
-
IoLogoTwitter,
|
|
10
|
-
IoLogoInstagram
|
|
11
|
-
} from "react-icons/io";
|
|
12
|
-
import {
|
|
13
|
-
Box,
|
|
14
|
-
Stack,
|
|
15
|
-
Switcher,
|
|
16
|
-
Cluster,
|
|
17
|
-
Paragraph,
|
|
18
|
-
Heading
|
|
19
|
-
} from "@thecb/components";
|
|
20
|
-
|
|
21
|
-
const LocationBlock = ({
|
|
22
|
-
locationName = "",
|
|
23
|
-
address1 = "",
|
|
24
|
-
address2 = "",
|
|
25
|
-
address3 = "",
|
|
26
|
-
city = "",
|
|
27
|
-
state = "",
|
|
28
|
-
zip = "",
|
|
29
|
-
phone = "",
|
|
30
|
-
fax = "",
|
|
31
|
-
email = "",
|
|
32
|
-
hours1 = "",
|
|
33
|
-
hours2 = "",
|
|
34
|
-
facebookUrl = "",
|
|
35
|
-
twitterUrl = "",
|
|
36
|
-
instagramUrl = "",
|
|
37
|
-
themeValues,
|
|
38
|
-
variant = "default"
|
|
39
|
-
}) => {
|
|
40
|
-
console.log("hey hey hey");
|
|
41
|
-
console.log("variant is...", variant);
|
|
42
|
-
console.log("zip is", zip);
|
|
43
|
-
console.log("state is", state);
|
|
44
|
-
console.log("address2 is", address2);
|
|
45
|
-
const cityString = `${city}, ${state} ${zip}`;
|
|
46
|
-
console.log("email is", email);
|
|
47
|
-
return (
|
|
48
|
-
<Box maxWidth="450px" minHeight={"auto"} padding="0" minWidth="100%">
|
|
49
|
-
<Box padding="16px" background="white" borderRadius="4px">
|
|
50
|
-
<Stack>
|
|
51
|
-
<Box
|
|
52
|
-
key="location-heading"
|
|
53
|
-
borderSize="1px"
|
|
54
|
-
borderColor="#cfd4de"
|
|
55
|
-
borderWidthOverride="0 0 1px 0"
|
|
56
|
-
padding="16px 0 32px 0"
|
|
57
|
-
>
|
|
58
|
-
<Stack>
|
|
59
|
-
<Paragraph
|
|
60
|
-
key="get-in-touch"
|
|
61
|
-
extraStyles={`text-transform: uppercase;`}
|
|
62
|
-
>
|
|
63
|
-
Get in touch
|
|
64
|
-
</Paragraph>
|
|
65
|
-
<Heading
|
|
66
|
-
key="location-name"
|
|
67
|
-
variant="h3"
|
|
68
|
-
color={themeValues.darkAccentText}
|
|
69
|
-
extraStyles={`margin-top: 16px;`}
|
|
70
|
-
>
|
|
71
|
-
{locationName}
|
|
72
|
-
</Heading>
|
|
73
|
-
</Stack>
|
|
74
|
-
</Box>
|
|
75
|
-
<Switcher key="location-info">
|
|
76
|
-
<Box key="hours-address">
|
|
77
|
-
<Stack>
|
|
78
|
-
{hours1 && hours2 && (
|
|
79
|
-
<Box padding="0" key="hours">
|
|
80
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
81
|
-
<Box padding="0">
|
|
82
|
-
<IoMdTime size="29px" />
|
|
83
|
-
</Box>
|
|
84
|
-
<Box padding="0 0 0 16px">
|
|
85
|
-
<Paragraph variant="pL">{`${hours1} am - ${hours2} pm (M-F)`}</Paragraph>
|
|
86
|
-
</Box>
|
|
87
|
-
</Cluster>
|
|
88
|
-
</Box>
|
|
89
|
-
)}
|
|
90
|
-
{address1 && (
|
|
91
|
-
<Box padding="0" key="address">
|
|
92
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
93
|
-
<Box padding="0">
|
|
94
|
-
<IoIosPin size="29px" />
|
|
95
|
-
</Box>
|
|
96
|
-
<Box padding="0 0 0 16px">
|
|
97
|
-
<Stack childGap="1rem">
|
|
98
|
-
<Paragraph key="address-1" variant="pL">
|
|
99
|
-
{address1}
|
|
100
|
-
</Paragraph>
|
|
101
|
-
{address2 && (
|
|
102
|
-
<Paragraph
|
|
103
|
-
key="address-2"
|
|
104
|
-
variant="pL"
|
|
105
|
-
extraStyles={`margin-top: 1rem;`}
|
|
106
|
-
>
|
|
107
|
-
{address2}
|
|
108
|
-
</Paragraph>
|
|
109
|
-
)}
|
|
110
|
-
{address3 && (
|
|
111
|
-
<Paragraph
|
|
112
|
-
key="address-3"
|
|
113
|
-
variant="pL"
|
|
114
|
-
extraStyles={`margin-top: 1rem;`}
|
|
115
|
-
>
|
|
116
|
-
{address3}
|
|
117
|
-
</Paragraph>
|
|
118
|
-
)}
|
|
119
|
-
{city && (
|
|
120
|
-
<Paragraph
|
|
121
|
-
key="city-state"
|
|
122
|
-
variant="pL"
|
|
123
|
-
extraStyles={`margin-top: 1rem;`}
|
|
124
|
-
>
|
|
125
|
-
{cityString}
|
|
126
|
-
</Paragraph>
|
|
127
|
-
)}
|
|
128
|
-
</Stack>
|
|
129
|
-
</Box>
|
|
130
|
-
</Cluster>
|
|
131
|
-
</Box>
|
|
132
|
-
)}
|
|
133
|
-
</Stack>
|
|
134
|
-
</Box>
|
|
135
|
-
<Box key="phone-email">
|
|
136
|
-
<Stack>
|
|
137
|
-
{phone && (
|
|
138
|
-
<Box padding="0" key="phone">
|
|
139
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
140
|
-
<Box padding="0">
|
|
141
|
-
<IoIosCall size="29px" />
|
|
142
|
-
</Box>
|
|
143
|
-
<Box padding="0 0 0 16px">
|
|
144
|
-
<Paragraph variant="pL">{phone}</Paragraph>
|
|
145
|
-
</Box>
|
|
146
|
-
</Cluster>
|
|
147
|
-
</Box>
|
|
148
|
-
)}
|
|
149
|
-
{fax && (
|
|
150
|
-
<Box padding="0" key="email">
|
|
151
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
152
|
-
<Box padding="0">
|
|
153
|
-
<IoMdPrint size="29px" />
|
|
154
|
-
</Box>
|
|
155
|
-
<Box padding="0 0 0 16px">
|
|
156
|
-
<Paragraph variant="pL">{fax}</Paragraph>
|
|
157
|
-
</Box>
|
|
158
|
-
</Cluster>
|
|
159
|
-
</Box>
|
|
160
|
-
)}
|
|
161
|
-
{email && (
|
|
162
|
-
<Box padding="0" key="email">
|
|
163
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
164
|
-
<Box padding="0">
|
|
165
|
-
<IoMdMail size="29px" />
|
|
166
|
-
</Box>
|
|
167
|
-
<Box padding="0 0 0 16px">
|
|
168
|
-
<Paragraph variant="pL">{email}</Paragraph>
|
|
169
|
-
</Box>
|
|
170
|
-
</Cluster>
|
|
171
|
-
</Box>
|
|
172
|
-
)}
|
|
173
|
-
</Stack>
|
|
174
|
-
</Box>
|
|
175
|
-
<Box key="social">
|
|
176
|
-
<Stack>
|
|
177
|
-
{facebookUrl && (
|
|
178
|
-
<Box padding="0" key="fb">
|
|
179
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
180
|
-
<Box padding="0">
|
|
181
|
-
<IoLogoFacebook size="29px" />
|
|
182
|
-
</Box>
|
|
183
|
-
<Box padding="0 0 0 16px">
|
|
184
|
-
<Paragraph variant="pL">
|
|
185
|
-
Office's Facebook
|
|
186
|
-
</Paragraph>
|
|
187
|
-
</Box>
|
|
188
|
-
</Cluster>
|
|
189
|
-
</Box>
|
|
190
|
-
)}
|
|
191
|
-
{twitterUrl && (
|
|
192
|
-
<Box padding="0" key="twitter">
|
|
193
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
194
|
-
<Box padding="0">
|
|
195
|
-
<IoLogoTwitter size="29px" />
|
|
196
|
-
</Box>
|
|
197
|
-
<Box padding="0 0 0 16px">
|
|
198
|
-
<Paragraph variant="pL">
|
|
199
|
-
Office's Twitter
|
|
200
|
-
</Paragraph>
|
|
201
|
-
</Box>
|
|
202
|
-
</Cluster>
|
|
203
|
-
</Box>
|
|
204
|
-
)}
|
|
205
|
-
{instagramUrl && (
|
|
206
|
-
<Box padding="0" key="instagram">
|
|
207
|
-
<Cluster justify="flex-start" align="flex-start">
|
|
208
|
-
<Box padding="0">
|
|
209
|
-
<IoLogoInstagram size="29px" />
|
|
210
|
-
</Box>
|
|
211
|
-
<Box padding="0 0 0 16px">
|
|
212
|
-
<Paragraph variant="pL">
|
|
213
|
-
Office's Instagram
|
|
214
|
-
</Paragraph>
|
|
215
|
-
</Box>
|
|
216
|
-
</Cluster>
|
|
217
|
-
</Box>
|
|
218
|
-
)}
|
|
219
|
-
</Stack>
|
|
220
|
-
</Box>
|
|
221
|
-
</Switcher>
|
|
222
|
-
</Stack>
|
|
223
|
-
</Box>
|
|
224
|
-
</Box>
|
|
225
|
-
);
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
export default LocationBlock;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Stack, Paragraph, ExternalLink } from "@thecb/components";
|
|
3
|
-
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
4
|
-
|
|
5
|
-
const RelatedLinksBlock = ({ links, themeValues }) => (
|
|
6
|
-
<Box
|
|
7
|
-
padding="0"
|
|
8
|
-
background="white"
|
|
9
|
-
extraStyles={`margin-bottom: 2.5rem;`}
|
|
10
|
-
borderRadius="2px"
|
|
11
|
-
>
|
|
12
|
-
<Paragraph variant="p" color={themeValues.darkAccentText}>
|
|
13
|
-
Related Links
|
|
14
|
-
</Paragraph>
|
|
15
|
-
<ul>
|
|
16
|
-
<Stack>
|
|
17
|
-
{links.map(({ text, url }) => (
|
|
18
|
-
<li key={text}>
|
|
19
|
-
<ExternalLink to={url}>
|
|
20
|
-
<Paragraph
|
|
21
|
-
variant="pL"
|
|
22
|
-
weight={FONT_WEIGHT_SEMIBOLD}
|
|
23
|
-
color={themeValues.linkColor}
|
|
24
|
-
>
|
|
25
|
-
{text}
|
|
26
|
-
</Paragraph>
|
|
27
|
-
</ExternalLink>
|
|
28
|
-
</li>
|
|
29
|
-
))}
|
|
30
|
-
</Stack>
|
|
31
|
-
</ul>
|
|
32
|
-
</Box>
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
export default RelatedLinksBlock;
|