@windstream/react-shared-components 0.0.37 → 0.0.38
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/contentful/index.d.ts +9 -29
- package/dist/contentful/index.esm.js +1 -1
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +1 -1
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/accordion/index.tsx +49 -49
- package/src/components/alert-card/types.ts +9 -9
- package/src/components/brand-button/index.tsx +93 -93
- package/src/components/button/index.tsx +27 -27
- package/src/components/button/types.ts +14 -14
- package/src/components/checkbox/index.tsx +197 -197
- package/src/components/collapse/index.tsx +46 -46
- package/src/components/image/types.ts +33 -33
- package/src/components/input/index.tsx +6 -6
- package/src/components/link/index.tsx +97 -97
- package/src/components/link/types.ts +25 -25
- package/src/components/list/index.tsx +88 -88
- package/src/components/list/list-item/index.tsx +38 -38
- package/src/components/list/list-item/types.ts +13 -13
- package/src/components/list/types.ts +29 -29
- package/src/components/material-icon/index.tsx +44 -44
- package/src/components/material-icon/types.ts +31 -31
- package/src/components/modal/index.tsx +164 -164
- package/src/components/see-more/index.tsx +44 -44
- package/src/components/select/index.tsx +150 -150
- package/src/components/skeleton/index.tsx +61 -61
- package/src/components/text/index.tsx +25 -25
- package/src/components/text/types.ts +45 -45
- package/src/contentful/blocks/accordion/Accordion.stories.tsx +29 -29
- package/src/contentful/blocks/accordion/index.tsx +52 -52
- package/src/contentful/blocks/accordion/types.ts +17 -17
- package/src/contentful/blocks/button/index.tsx +5 -0
- package/src/contentful/blocks/button/types.ts +1 -0
- package/src/contentful/blocks/callout/Callout.stories.tsx +1 -1
- package/src/contentful/blocks/callout/index.tsx +15 -52
- package/src/contentful/blocks/callout/types.ts +1 -14
- package/src/contentful/blocks/find-kinetic/FindKinetic.stories.tsx +23 -23
- package/src/contentful/blocks/find-kinetic/index.tsx +80 -80
- package/src/contentful/blocks/find-kinetic/types.ts +18 -18
- package/src/contentful/blocks/footer/index.tsx +79 -79
- package/src/contentful/blocks/image-promo-bar/index.tsx +154 -154
- package/src/contentful/blocks/navigation/index.tsx +1 -2
- package/src/contentful/blocks/navigation/link-groups.tsx/index.tsx +64 -62
- package/src/contentful/blocks/primary-hero/index.tsx +163 -64
- package/src/contentful/blocks/primary-hero/types.ts +1 -0
- package/src/contentful/index.ts +45 -48
- package/src/hooks/use-body-scroll-lock.ts +34 -34
- package/src/setupTests.ts +46 -46
- package/src/contentful/blocks/cards/simple-card/index.tsx +0 -45
- package/src/contentful/blocks/cards/simple-card/types.ts +0 -11
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AccordionProps, ThemeKey } from "./types";
|
|
3
|
-
|
|
4
|
-
import { Accordion as AccordionComponent } from "@shared/components/accordion";
|
|
5
|
-
import { Text } from "@shared/components/text";
|
|
6
|
-
|
|
7
|
-
export const Accordion: React.FC<AccordionProps> = ({
|
|
8
|
-
items,
|
|
9
|
-
title,
|
|
10
|
-
background = "white",
|
|
11
|
-
enableHeading = false,
|
|
12
|
-
maxWidth = true,
|
|
13
|
-
}) => {
|
|
14
|
-
const bgColorClasses: Record<ThemeKey, string> = {
|
|
15
|
-
blue: "bg-[#07B2E2]",
|
|
16
|
-
green: "bg-[#26B170]",
|
|
17
|
-
yellow: "bg-[#F5FF1E]",
|
|
18
|
-
purple: "bg-[#931D69]",
|
|
19
|
-
white: "bg-white",
|
|
20
|
-
navy: "bg-[#00002D]",
|
|
21
|
-
};
|
|
22
|
-
return (
|
|
23
|
-
<div className={`${bgColorClasses[background]} component-container`}>
|
|
24
|
-
<div
|
|
25
|
-
className={`${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 my-8 lg:mx-20 lg:my-18`}
|
|
26
|
-
>
|
|
27
|
-
<div>
|
|
28
|
-
<Text
|
|
29
|
-
as={enableHeading ? "h1" : "h2"}
|
|
30
|
-
className="heading1 text-left lg:text-center"
|
|
31
|
-
>
|
|
32
|
-
{title}
|
|
33
|
-
</Text>
|
|
34
|
-
</div>
|
|
35
|
-
<div className="question-answer-section mt-10 lg:mt-16">
|
|
36
|
-
{items?.map((item: any, index: number) => (
|
|
37
|
-
<div key={`item-${index}`}>
|
|
38
|
-
<AccordionComponent
|
|
39
|
-
title={item.title}
|
|
40
|
-
containerClassName="border-0 border-b-[1px]"
|
|
41
|
-
>
|
|
42
|
-
<Text>{item.description}</Text>
|
|
43
|
-
</AccordionComponent>
|
|
44
|
-
</div>
|
|
45
|
-
))}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default Accordion;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AccordionProps, ThemeKey } from "./types";
|
|
3
|
+
|
|
4
|
+
import { Accordion as AccordionComponent } from "@shared/components/accordion";
|
|
5
|
+
import { Text } from "@shared/components/text";
|
|
6
|
+
|
|
7
|
+
export const Accordion: React.FC<AccordionProps> = ({
|
|
8
|
+
items,
|
|
9
|
+
title,
|
|
10
|
+
background = "white",
|
|
11
|
+
enableHeading = false,
|
|
12
|
+
maxWidth = true,
|
|
13
|
+
}) => {
|
|
14
|
+
const bgColorClasses: Record<ThemeKey, string> = {
|
|
15
|
+
blue: "bg-[#07B2E2]",
|
|
16
|
+
green: "bg-[#26B170]",
|
|
17
|
+
yellow: "bg-[#F5FF1E]",
|
|
18
|
+
purple: "bg-[#931D69]",
|
|
19
|
+
white: "bg-white",
|
|
20
|
+
navy: "bg-[#00002D]",
|
|
21
|
+
};
|
|
22
|
+
return (
|
|
23
|
+
<div className={`${bgColorClasses[background]} component-container`}>
|
|
24
|
+
<div
|
|
25
|
+
className={`${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 my-8 lg:mx-20 lg:my-18`}
|
|
26
|
+
>
|
|
27
|
+
<div>
|
|
28
|
+
<Text
|
|
29
|
+
as={enableHeading ? "h1" : "h2"}
|
|
30
|
+
className="heading1 text-left lg:text-center"
|
|
31
|
+
>
|
|
32
|
+
{title}
|
|
33
|
+
</Text>
|
|
34
|
+
</div>
|
|
35
|
+
<div className="question-answer-section mt-10 lg:mt-16">
|
|
36
|
+
{items?.map((item: any, index: number) => (
|
|
37
|
+
<div key={`item-${index}`}>
|
|
38
|
+
<AccordionComponent
|
|
39
|
+
title={item.title}
|
|
40
|
+
containerClassName="border-0 border-b-[1px]"
|
|
41
|
+
>
|
|
42
|
+
<Text>{item.description}</Text>
|
|
43
|
+
</AccordionComponent>
|
|
44
|
+
</div>
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default Accordion;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
export type AccordionProps = {
|
|
4
|
-
title: string;
|
|
5
|
-
enableHeading?: boolean;
|
|
6
|
-
background?: "blue" | "green" | "navy" | "purple" | "white" | "yellow";
|
|
7
|
-
items: { title: string; description: React.ReactNode }[];
|
|
8
|
-
maxWidth?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type ThemeKey =
|
|
12
|
-
| "blue"
|
|
13
|
-
| "green"
|
|
14
|
-
| "yellow"
|
|
15
|
-
| "purple"
|
|
16
|
-
| "white"
|
|
17
|
-
| "navy";
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export type AccordionProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
enableHeading?: boolean;
|
|
6
|
+
background?: "blue" | "green" | "navy" | "purple" | "white" | "yellow";
|
|
7
|
+
items: { title: string; description: React.ReactNode }[];
|
|
8
|
+
maxWidth?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ThemeKey =
|
|
12
|
+
| "blue"
|
|
13
|
+
| "green"
|
|
14
|
+
| "yellow"
|
|
15
|
+
| "purple"
|
|
16
|
+
| "white"
|
|
17
|
+
| "navy";
|
|
@@ -15,7 +15,12 @@ export const Button: React.FC<ButtonProps> = ({
|
|
|
15
15
|
linkClassName,
|
|
16
16
|
linkVariant,
|
|
17
17
|
fullWidth,
|
|
18
|
+
preDefinedFunctionExecution,
|
|
19
|
+
checkPlansJSX,
|
|
18
20
|
}) => {
|
|
21
|
+
if (preDefinedFunctionExecution === "check availability") {
|
|
22
|
+
return checkPlansJSX;
|
|
23
|
+
}
|
|
19
24
|
return showButtonAs === "solid" ? (
|
|
20
25
|
<BrandButton
|
|
21
26
|
id={anchorId}
|
|
@@ -1,52 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enableHeading = false,
|
|
17
|
-
subtitle,
|
|
18
|
-
color = "dark",
|
|
19
|
-
maxWidth = true,
|
|
20
|
-
}) => {
|
|
21
|
-
return (
|
|
22
|
-
<div className="component-container">
|
|
23
|
-
<div
|
|
24
|
-
className={`mx-5 mb-5 mt-12 ${maxWidth ? "max-w-120 xl:mx-auto" : ""} ${color == "dark" ? "text-text" : "text-white"}`}
|
|
25
|
-
>
|
|
26
|
-
<div className="callout-container flex flex-col gap-8">
|
|
27
|
-
<div className="title-holder">
|
|
28
|
-
{title && (
|
|
29
|
-
<Text
|
|
30
|
-
as={enableHeading ? "h1" : "h2"}
|
|
31
|
-
className="heading2 md:heading1 md:text-center"
|
|
32
|
-
>
|
|
33
|
-
{title}
|
|
34
|
-
</Text>
|
|
35
|
-
)}
|
|
36
|
-
{subtitle && (
|
|
37
|
-
<Text
|
|
38
|
-
as={enableHeading ? "h2" : "h3"}
|
|
39
|
-
className="subheading3 mt-3 md:subheading1 md:text-center"
|
|
40
|
-
>
|
|
41
|
-
{subtitle}
|
|
42
|
-
</Text>
|
|
43
|
-
)}
|
|
44
|
-
</div>
|
|
45
|
-
{items && <SimpleCards items={items} />}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default Callout;
|
|
1
|
+
import { CalloutProps } from "./types";
|
|
2
|
+
|
|
3
|
+
import { BrandButton } from "@shared/components/brand-button";
|
|
4
|
+
import { Text } from "@shared/components/text";
|
|
5
|
+
|
|
6
|
+
export const Callout: React.FC<{ fields: CalloutProps }> = ({ fields }) => {
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<Text>Callout</Text>
|
|
10
|
+
<BrandButton label="Callout" />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Callout;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
export type CalloutProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
enableHeading?: boolean;
|
|
4
|
-
subtitle?: string;
|
|
5
|
-
applyBoxShadow?: boolean;
|
|
6
|
-
cardStackingMobile?: boolean;
|
|
7
|
-
bottomText?: string;
|
|
8
|
-
color?: "dark" | "light";
|
|
9
|
-
cardsWidth?: string;
|
|
10
|
-
maxCardsPerRow?: number;
|
|
11
|
-
noGutter?: boolean;
|
|
12
|
-
items: any[];
|
|
13
|
-
maxWidth?: boolean;
|
|
14
|
-
};
|
|
1
|
+
export type CalloutProps = {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { FindKinetic } from "./index";
|
|
2
|
-
|
|
3
|
-
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof FindKinetic> = {
|
|
7
|
-
title: "Contentful Blocks/FindKinetic",
|
|
8
|
-
component: FindKinetic,
|
|
9
|
-
tags: ["autodocs"],
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: "centered",
|
|
12
|
-
docs: {
|
|
13
|
-
page: DocsPage,
|
|
14
|
-
description: {
|
|
15
|
-
component: "Contentful FindKinetic block.",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
args: {},
|
|
20
|
-
};
|
|
21
|
-
export default meta;
|
|
22
|
-
type Story = StoryObj<typeof meta>;
|
|
23
|
-
export const Default: Story = {};
|
|
1
|
+
import { FindKinetic } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof FindKinetic> = {
|
|
7
|
+
title: "Contentful Blocks/FindKinetic",
|
|
8
|
+
component: FindKinetic,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful FindKinetic block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: {},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FindKineticProps, ThemeKey } from "./types";
|
|
3
|
-
|
|
4
|
-
import { Link } from "@shared/components/link";
|
|
5
|
-
import { Text } from "@shared/components/text";
|
|
6
|
-
import { NextImage } from "@shared/next";
|
|
7
|
-
|
|
8
|
-
export const FindKinetic: React.FC<FindKineticProps> = ({
|
|
9
|
-
background = "white",
|
|
10
|
-
description,
|
|
11
|
-
enableHeading,
|
|
12
|
-
image,
|
|
13
|
-
list = [],
|
|
14
|
-
subTitle,
|
|
15
|
-
title,
|
|
16
|
-
maxWidth = true,
|
|
17
|
-
}) => {
|
|
18
|
-
const bgColorClasses: Record<ThemeKey, string> = {
|
|
19
|
-
blue: "bg-[#07B2E2]",
|
|
20
|
-
green: "bg-[#26B170]",
|
|
21
|
-
yellow: "bg-[#F5FF1E]",
|
|
22
|
-
purple: "bg-[#931D69]",
|
|
23
|
-
white: "bg-white",
|
|
24
|
-
navy: "bg-[#00002D]",
|
|
25
|
-
};
|
|
26
|
-
return (
|
|
27
|
-
<div className={`${bgColorClasses[background]} component-container`}>
|
|
28
|
-
<div
|
|
29
|
-
className={`${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 mb-5 mt-12 xl:my-20`}
|
|
30
|
-
>
|
|
31
|
-
{title && (
|
|
32
|
-
<Text
|
|
33
|
-
as={enableHeading ? "h1" : "h2"}
|
|
34
|
-
className="heading2 md:heading1 md:text-center"
|
|
35
|
-
>
|
|
36
|
-
{title}
|
|
37
|
-
</Text>
|
|
38
|
-
)}
|
|
39
|
-
{subTitle && (
|
|
40
|
-
<Text
|
|
41
|
-
as={enableHeading ? "h2" : "h3"}
|
|
42
|
-
className="heading3 mt-4 text-center"
|
|
43
|
-
>
|
|
44
|
-
{subTitle}
|
|
45
|
-
</Text>
|
|
46
|
-
)}
|
|
47
|
-
|
|
48
|
-
<div className="mt-8 flex items-center xl:mt-16 xl:gap-10">
|
|
49
|
-
<div className="flex flex-col items-start gap-10 self-stretch xl:flex-[1_0_0]">
|
|
50
|
-
{description && (
|
|
51
|
-
<Text as="p" className="body1">
|
|
52
|
-
{description}
|
|
53
|
-
</Text>
|
|
54
|
-
)}
|
|
55
|
-
{list.length > 0 && (
|
|
56
|
-
<ul className="grid w-full grid-cols-2 gap-x-8 gap-y-4 lg:grid-cols-3">
|
|
57
|
-
{list?.map((item, index: number) => {
|
|
58
|
-
return (
|
|
59
|
-
<li key={`item-list-${index}`}>
|
|
60
|
-
<Link href={`/${item.code}`} className="label1">
|
|
61
|
-
{item.name}
|
|
62
|
-
</Link>
|
|
63
|
-
</li>
|
|
64
|
-
);
|
|
65
|
-
})}
|
|
66
|
-
</ul>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
{image && (
|
|
70
|
-
<aside className="hidden xl:block">
|
|
71
|
-
<NextImage width={472} height={100} src={image} alt="image" />
|
|
72
|
-
</aside>
|
|
73
|
-
)}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default FindKinetic;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FindKineticProps, ThemeKey } from "./types";
|
|
3
|
+
|
|
4
|
+
import { Link } from "@shared/components/link";
|
|
5
|
+
import { Text } from "@shared/components/text";
|
|
6
|
+
import { NextImage } from "@shared/next";
|
|
7
|
+
|
|
8
|
+
export const FindKinetic: React.FC<FindKineticProps> = ({
|
|
9
|
+
background = "white",
|
|
10
|
+
description,
|
|
11
|
+
enableHeading,
|
|
12
|
+
image,
|
|
13
|
+
list = [],
|
|
14
|
+
subTitle,
|
|
15
|
+
title,
|
|
16
|
+
maxWidth = true,
|
|
17
|
+
}) => {
|
|
18
|
+
const bgColorClasses: Record<ThemeKey, string> = {
|
|
19
|
+
blue: "bg-[#07B2E2]",
|
|
20
|
+
green: "bg-[#26B170]",
|
|
21
|
+
yellow: "bg-[#F5FF1E]",
|
|
22
|
+
purple: "bg-[#931D69]",
|
|
23
|
+
white: "bg-white",
|
|
24
|
+
navy: "bg-[#00002D]",
|
|
25
|
+
};
|
|
26
|
+
return (
|
|
27
|
+
<div className={`${bgColorClasses[background]} component-container`}>
|
|
28
|
+
<div
|
|
29
|
+
className={`${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 mb-5 mt-12 xl:my-20`}
|
|
30
|
+
>
|
|
31
|
+
{title && (
|
|
32
|
+
<Text
|
|
33
|
+
as={enableHeading ? "h1" : "h2"}
|
|
34
|
+
className="heading2 md:heading1 md:text-center"
|
|
35
|
+
>
|
|
36
|
+
{title}
|
|
37
|
+
</Text>
|
|
38
|
+
)}
|
|
39
|
+
{subTitle && (
|
|
40
|
+
<Text
|
|
41
|
+
as={enableHeading ? "h2" : "h3"}
|
|
42
|
+
className="heading3 mt-4 text-center"
|
|
43
|
+
>
|
|
44
|
+
{subTitle}
|
|
45
|
+
</Text>
|
|
46
|
+
)}
|
|
47
|
+
|
|
48
|
+
<div className="mt-8 flex items-center xl:mt-16 xl:gap-10">
|
|
49
|
+
<div className="flex flex-col items-start gap-10 self-stretch xl:flex-[1_0_0]">
|
|
50
|
+
{description && (
|
|
51
|
+
<Text as="p" className="body1">
|
|
52
|
+
{description}
|
|
53
|
+
</Text>
|
|
54
|
+
)}
|
|
55
|
+
{list.length > 0 && (
|
|
56
|
+
<ul className="grid w-full grid-cols-2 gap-x-8 gap-y-4 lg:grid-cols-3">
|
|
57
|
+
{list?.map((item, index: number) => {
|
|
58
|
+
return (
|
|
59
|
+
<li key={`item-list-${index}`}>
|
|
60
|
+
<Link href={`/${item.code}`} className="label1">
|
|
61
|
+
{item.name}
|
|
62
|
+
</Link>
|
|
63
|
+
</li>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
66
|
+
</ul>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
{image && (
|
|
70
|
+
<aside className="hidden xl:block">
|
|
71
|
+
<NextImage width={472} height={100} src={image} alt="image" />
|
|
72
|
+
</aside>
|
|
73
|
+
)}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default FindKinetic;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export type FindKineticProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
enableHeading?: boolean;
|
|
4
|
-
subTitle?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
background?: "blue" | "green" | "navy" | "purple" | "white" | "yellow";
|
|
7
|
-
image?: string;
|
|
8
|
-
list?: { name: string; code: string }[];
|
|
9
|
-
maxWidth?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type ThemeKey =
|
|
13
|
-
| "blue"
|
|
14
|
-
| "green"
|
|
15
|
-
| "yellow"
|
|
16
|
-
| "purple"
|
|
17
|
-
| "white"
|
|
18
|
-
| "navy";
|
|
1
|
+
export type FindKineticProps = {
|
|
2
|
+
title?: string;
|
|
3
|
+
enableHeading?: boolean;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
background?: "blue" | "green" | "navy" | "purple" | "white" | "yellow";
|
|
7
|
+
image?: string;
|
|
8
|
+
list?: { name: string; code: string }[];
|
|
9
|
+
maxWidth?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ThemeKey =
|
|
13
|
+
| "blue"
|
|
14
|
+
| "green"
|
|
15
|
+
| "yellow"
|
|
16
|
+
| "purple"
|
|
17
|
+
| "white"
|
|
18
|
+
| "navy";
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export const Footer: React.FC<FooterProps> = ({
|
|
8
|
-
body,
|
|
9
|
-
links,
|
|
10
|
-
bottomLinks,
|
|
11
|
-
copyrights,
|
|
12
|
-
terms,
|
|
13
|
-
maxWidth = true,
|
|
14
|
-
}) => {
|
|
15
|
-
return (
|
|
16
|
-
<div className="component-container bg-bg-inverse text-white">
|
|
17
|
-
<div className={` ${maxWidth ? "mx-auto max-w-120" : ""} px-5 py-8`}>
|
|
18
|
-
<div>{body}</div>
|
|
19
|
-
<div
|
|
20
|
-
className={
|
|
21
|
-
"my-8 h-[1px] border-t-0 bg-white opacity-100 lg:my-16 dark:opacity-50"
|
|
22
|
-
}
|
|
23
|
-
/>
|
|
24
|
-
<div className="grid-1 grid gap-8 py-8 md:grid-cols-2 lg:grid-cols-4">
|
|
25
|
-
{links?.map((link: any, index: number) => (
|
|
26
|
-
<React.Fragment key={`footer-link-group-${index}`}>
|
|
27
|
-
<div key={`footer-link-group-${index}`}>
|
|
28
|
-
<div className="site-links-group" key={`link-group-${index}`}>
|
|
29
|
-
<Text as="div" className="label3">
|
|
30
|
-
{link?.title}
|
|
31
|
-
</Text>
|
|
32
|
-
<ul className="flex flex-col">
|
|
33
|
-
{link?.items?.items?.map((site: any, _index: number) => (
|
|
34
|
-
<li className="pt-3" key={`site-links-${_index}`}>
|
|
35
|
-
<Button
|
|
36
|
-
{...site}
|
|
37
|
-
linkVariant="unstyled"
|
|
38
|
-
linkClassName="text-white body3"
|
|
39
|
-
/>
|
|
40
|
-
</li>
|
|
41
|
-
))}
|
|
42
|
-
</ul>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div
|
|
46
|
-
className={
|
|
47
|
-
"block h-[1px] border-t-0 bg-white opacity-100 md:hidden dark:opacity-50"
|
|
48
|
-
}
|
|
49
|
-
/>
|
|
50
|
-
</React.Fragment>
|
|
51
|
-
))}
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div className="pt-8">
|
|
55
|
-
<p className="copy-rights">{copyrights}</p>
|
|
56
|
-
<p className="terms-text footnote text-white">
|
|
57
|
-
© {new Date().getFullYear()} {terms}
|
|
58
|
-
</p>
|
|
59
|
-
<ul className="bottom-links list-none">
|
|
60
|
-
{bottomLinks?.map((link: any, index: number) => (
|
|
61
|
-
<li
|
|
62
|
-
key={`links-${index}`}
|
|
63
|
-
className="relative float-left pl-[8px] before:absolute before:left-[3px] before:top-1/2 before:-translate-y-1/2 before:text-[14px] before:content-['•'] first-of-type:pl-0 first-of-type:before:content-['']"
|
|
64
|
-
>
|
|
65
|
-
<Button
|
|
66
|
-
{...link}
|
|
67
|
-
linkClassName="footnote text-white"
|
|
68
|
-
linkVariant="unstyled"
|
|
69
|
-
/>
|
|
70
|
-
</li>
|
|
71
|
-
))}
|
|
72
|
-
</ul>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export default Footer;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FooterProps } from "./types";
|
|
3
|
+
|
|
4
|
+
import { Text } from "@shared/components/text";
|
|
5
|
+
import { Button } from "@shared/contentful";
|
|
6
|
+
|
|
7
|
+
export const Footer: React.FC<FooterProps> = ({
|
|
8
|
+
body,
|
|
9
|
+
links,
|
|
10
|
+
bottomLinks,
|
|
11
|
+
copyrights,
|
|
12
|
+
terms,
|
|
13
|
+
maxWidth = true,
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<div className="component-container bg-bg-inverse text-white">
|
|
17
|
+
<div className={` ${maxWidth ? "mx-auto max-w-120" : ""} px-5 py-8 `}>
|
|
18
|
+
<div>{body}</div>
|
|
19
|
+
<div
|
|
20
|
+
className={
|
|
21
|
+
"my-8 h-[1px] border-t-0 bg-white opacity-100 lg:my-16 dark:opacity-50"
|
|
22
|
+
}
|
|
23
|
+
/>
|
|
24
|
+
<div className="grid-1 grid gap-8 py-8 md:grid-cols-2 lg:grid-cols-4">
|
|
25
|
+
{links?.map((link: any, index: number) => (
|
|
26
|
+
<React.Fragment key={`footer-link-group-${index}`}>
|
|
27
|
+
<div key={`footer-link-group-${index}`}>
|
|
28
|
+
<div className="site-links-group" key={`link-group-${index}`}>
|
|
29
|
+
<Text as="div" className="label3">
|
|
30
|
+
{link?.title}
|
|
31
|
+
</Text>
|
|
32
|
+
<ul className="flex flex-col">
|
|
33
|
+
{link?.items?.items?.map((site: any, _index: number) => (
|
|
34
|
+
<li className="pt-3" key={`site-links-${_index}`}>
|
|
35
|
+
<Button
|
|
36
|
+
{...site}
|
|
37
|
+
linkVariant="unstyled"
|
|
38
|
+
linkClassName="text-white body3"
|
|
39
|
+
/>
|
|
40
|
+
</li>
|
|
41
|
+
))}
|
|
42
|
+
</ul>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div
|
|
46
|
+
className={
|
|
47
|
+
"block h-[1px] border-t-0 bg-white opacity-100 md:hidden dark:opacity-50"
|
|
48
|
+
}
|
|
49
|
+
/>
|
|
50
|
+
</React.Fragment>
|
|
51
|
+
))}
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div className="pt-8">
|
|
55
|
+
<p className="copy-rights">{copyrights}</p>
|
|
56
|
+
<p className="terms-text footnote text-white">
|
|
57
|
+
© {new Date().getFullYear()} {terms}
|
|
58
|
+
</p>
|
|
59
|
+
<ul className="bottom-links list-none">
|
|
60
|
+
{bottomLinks?.map((link: any, index: number) => (
|
|
61
|
+
<li
|
|
62
|
+
key={`links-${index}`}
|
|
63
|
+
className="relative float-left pl-[8px] before:absolute before:left-[3px] before:top-1/2 before:-translate-y-1/2 before:text-[14px] before:content-['•'] first-of-type:pl-0 first-of-type:before:content-['']"
|
|
64
|
+
>
|
|
65
|
+
<Button
|
|
66
|
+
{...link}
|
|
67
|
+
linkClassName="footnote text-white"
|
|
68
|
+
linkVariant="unstyled"
|
|
69
|
+
/>
|
|
70
|
+
</li>
|
|
71
|
+
))}
|
|
72
|
+
</ul>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default Footer;
|