@windstream/react-shared-components 0.2.18 → 0.2.20
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.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +2 -2
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +8 -3
- package/dist/index.d.ts +9 -4
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/animation-wrapper/index.tsx +1 -0
- package/src/components/brand-button/index.tsx +30 -17
- package/src/components/brand-button/types.ts +3 -0
- package/src/components/checkbox/index.test.tsx +26 -0
- package/src/components/checkbox/index.tsx +2 -2
- package/src/components/checkbox/types.ts +1 -0
- package/src/components/select/index.test.tsx +69 -1
- package/src/components/select/index.tsx +21 -13
- package/src/components/select/types.ts +2 -1
- package/src/contentful/blocks/button/index.tsx +8 -0
- package/src/contentful/blocks/cart-retention-banner/CartRetentionBanner.stories.tsx +168 -0
- package/src/contentful/blocks/email-input-block/EmailInputBlock.stories.tsx +182 -0
- package/src/contentful/blocks/find-kinetic/FindKinetic.stories.mocks.ts +11 -0
- package/src/contentful/blocks/find-kinetic/FindKinetic.stories.tsx +121 -4
- package/src/contentful/blocks/image-promo-bar/ImagePromoBar.stories.tsx +245 -4
- package/src/contentful/blocks/primary-hero/PrimaryHero.stories.tsx +268 -4
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { ImagePromoBar } from "./index";
|
|
2
2
|
|
|
3
3
|
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
+
import type { Decorator, Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// Wrapper that adds a dark background for light-theme stories (text is white in light mode)
|
|
7
|
+
const DarkBgDecorator: Decorator = Story => (
|
|
8
|
+
<div style={{ background: "#1a2e44" }}>
|
|
9
|
+
<Story />
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
// Wrapper for dark-theme stories (text is dark, white background is fine)
|
|
14
|
+
const LightBgDecorator: Decorator = Story => (
|
|
15
|
+
<div style={{ background: "#f3f4f6" }}>
|
|
16
|
+
<Story />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof ImagePromoBar> = {
|
|
7
21
|
title: "Contentful Blocks/ImagePromoBar",
|
|
8
22
|
component: ImagePromoBar,
|
|
9
23
|
tags: ["autodocs"],
|
|
10
24
|
parameters: {
|
|
11
|
-
layout: "
|
|
25
|
+
layout: "fullscreen",
|
|
12
26
|
docs: {
|
|
13
27
|
page: DocsPage,
|
|
14
28
|
description: {
|
|
@@ -16,8 +30,235 @@ const meta: Meta<typeof ImagePromoBar> = {
|
|
|
16
30
|
},
|
|
17
31
|
},
|
|
18
32
|
},
|
|
19
|
-
|
|
33
|
+
argTypes: {
|
|
34
|
+
color: {
|
|
35
|
+
control: { type: "select" },
|
|
36
|
+
options: ["light", "dark"],
|
|
37
|
+
},
|
|
38
|
+
mediaPosition: { control: "boolean" },
|
|
39
|
+
enableHeading: {
|
|
40
|
+
control: "boolean",
|
|
41
|
+
description:
|
|
42
|
+
"Controls the semantic HTML heading level for SEO/accessibility. `true` → title renders as `<h1>`, subtitle as `<h2>`. `false` → title as `<h2>`, subtitle as `<h3>`. **Does not change visual appearance** — only the underlying HTML tag changes.",
|
|
43
|
+
},
|
|
44
|
+
isAboveTheFold: { control: "boolean" },
|
|
45
|
+
useOriginalImageAspectRatio: { control: "boolean" },
|
|
46
|
+
maxWidth: { control: "boolean" },
|
|
47
|
+
// Paste any Contentful image URL here to preview it in the component
|
|
48
|
+
image: {
|
|
49
|
+
control: "text",
|
|
50
|
+
description:
|
|
51
|
+
"Contentful image URL. Replace with any valid Contentful asset URL to test different images.",
|
|
52
|
+
},
|
|
53
|
+
// Explicitly declare React.ReactNode props as text controls AND string
|
|
54
|
+
// type to prevent Storybook from auto-inferring them as "object".
|
|
55
|
+
// Without type:"string", Storybook still serialises/deserialises these
|
|
56
|
+
// args as objects (from URL params), passing {} as a React child and
|
|
57
|
+
// triggering React error #31: "Objects are not valid as a React child".
|
|
58
|
+
description: { control: "text", type: "string" },
|
|
59
|
+
disclaimer: { control: "text", type: "string" },
|
|
60
|
+
ctaDisclaimer: { control: "text", type: "string" },
|
|
61
|
+
},
|
|
20
62
|
};
|
|
21
63
|
export default meta;
|
|
22
64
|
type Story = StoryObj<typeof meta>;
|
|
23
|
-
|
|
65
|
+
|
|
66
|
+
// ─── Shared base args ────────────────────────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
const baseArgs = {
|
|
69
|
+
brow: "Kinetic 8 Gig",
|
|
70
|
+
title: "Next-level multi-gig internet speeds. Only from Kinetic.",
|
|
71
|
+
subTitle: "Free Whole Home Wi-Fi Set Up",
|
|
72
|
+
description:
|
|
73
|
+
"Our advanced fiber network delivers multi-gig speeds up to 8 Gig. As the largest 8 Gig internet provider, Kinetic powers your devices with the speed, bandwidth, and latest technology to give you the most consistent, reliable connection.",
|
|
74
|
+
image:
|
|
75
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/1toxzgRb5VaVpdpsLWromO/8e5a9222d726b52a498eeea1340edd8c/AdobeStock_345768996.jpeg",
|
|
76
|
+
color: "light" as const,
|
|
77
|
+
mediaPosition: true,
|
|
78
|
+
enableHeading: false,
|
|
79
|
+
maxWidth: true,
|
|
80
|
+
checklist: [] as string[],
|
|
81
|
+
imageLinks: [] as { url: string; image: string }[],
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const primaryCta = {
|
|
85
|
+
showButtonAs: "solid",
|
|
86
|
+
buttonVariant: "primary_brand",
|
|
87
|
+
buttonLabel: "Check Availability",
|
|
88
|
+
href: "https://dev-res.windstream.com/buy",
|
|
89
|
+
target: "_blank" as const,
|
|
90
|
+
preserveQueryParameters: true,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const secondaryCta = {
|
|
94
|
+
showButtonAs: "solid",
|
|
95
|
+
buttonVariant: "secondary",
|
|
96
|
+
buttonLabel: "Learn More",
|
|
97
|
+
href: "#",
|
|
98
|
+
target: "_self" as const,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const realChecklist = [
|
|
102
|
+
"Review your existing Wi-Fi set-up.",
|
|
103
|
+
"Examine and certify connection speed throughout your home",
|
|
104
|
+
"Recommend Wi-Fi extending equipment to eliminate dead spots.",
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
const realImageLinks = [
|
|
108
|
+
{
|
|
109
|
+
url: "https://apps.apple.com/us/app/id1342262959",
|
|
110
|
+
image:
|
|
111
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/5txcuXefjBwiPLcWMOz5b/4379d6535ae32d95ef1a42f41f8eb831/appstore.png",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
url: "https://play.google.com/store/apps/details?id=com.windstream.residential&hl=en_US&gl=US",
|
|
115
|
+
image:
|
|
116
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/h840guug8WGHMgnKd2OZQ/f21b3294ff560198d805e1fdae58f89f/googleplay.png",
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
const realVideoLink = {
|
|
121
|
+
link: "https://youtu.be/5_l3T8f7rk4",
|
|
122
|
+
image:
|
|
123
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/1toxzgRb5VaVpdpsLWromO/8e5a9222d726b52a498eeea1340edd8c/AdobeStock_345768996.jpeg",
|
|
124
|
+
videoPopup: false,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// ─── AC1 — Heading & Text Content ────────────────────────────────────────────
|
|
128
|
+
|
|
129
|
+
export const Default: Story = {
|
|
130
|
+
decorators: [DarkBgDecorator],
|
|
131
|
+
args: {
|
|
132
|
+
...baseArgs,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// ─── AC2 — Media Position (right) ─────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
export const MediaRight: Story = {
|
|
139
|
+
decorators: [DarkBgDecorator],
|
|
140
|
+
args: {
|
|
141
|
+
...baseArgs,
|
|
142
|
+
mediaPosition: false,
|
|
143
|
+
imageWidth: 200,
|
|
144
|
+
imageHeight: 300,
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// ─── AC3 — Static Image / Original Aspect Ratio ──────────────────────────────
|
|
149
|
+
|
|
150
|
+
export const OriginalAspectRatio: Story = {
|
|
151
|
+
decorators: [DarkBgDecorator],
|
|
152
|
+
args: {
|
|
153
|
+
...baseArgs,
|
|
154
|
+
image:
|
|
155
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/1toxzgRb5VaVpdpsLWromO/8e5a9222d726b52a498eeea1340edd8c/AdobeStock_345768996.jpeg",
|
|
156
|
+
useOriginalImageAspectRatio: true,
|
|
157
|
+
imageWidth: 660,
|
|
158
|
+
imageHeight: 440,
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// ─── AC4 — Video Playback: Inline ────────────────────────────────────────────
|
|
163
|
+
|
|
164
|
+
export const InlineVideo: Story = {
|
|
165
|
+
decorators: [DarkBgDecorator],
|
|
166
|
+
args: {
|
|
167
|
+
...baseArgs,
|
|
168
|
+
image: undefined,
|
|
169
|
+
videoLink: { ...realVideoLink, videoPopup: false },
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// ─── AC5 — Video Playback: Popup ─────────────────────────────────────────────
|
|
174
|
+
|
|
175
|
+
export const PopupVideo: Story = {
|
|
176
|
+
decorators: [DarkBgDecorator],
|
|
177
|
+
args: {
|
|
178
|
+
...baseArgs,
|
|
179
|
+
image: undefined,
|
|
180
|
+
videoLink: { ...realVideoLink, videoPopup: true },
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// ─── AC6 — Checklist Rendering ───────────────────────────────────────────────
|
|
185
|
+
|
|
186
|
+
export const WithChecklist: Story = {
|
|
187
|
+
decorators: [DarkBgDecorator],
|
|
188
|
+
args: {
|
|
189
|
+
...baseArgs,
|
|
190
|
+
checklist: realChecklist,
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// ─── AC7 — Primary & Secondary CTAs ─────────────────────────────────────────
|
|
195
|
+
|
|
196
|
+
export const WithCTAs: Story = {
|
|
197
|
+
decorators: [DarkBgDecorator],
|
|
198
|
+
args: {
|
|
199
|
+
...baseArgs,
|
|
200
|
+
cta: primaryCta,
|
|
201
|
+
secondaryCta: secondaryCta,
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// ─── AC8 — Image Links ────────────────────────────────────────────────────────
|
|
206
|
+
|
|
207
|
+
export const WithImageLinks: Story = {
|
|
208
|
+
decorators: [DarkBgDecorator],
|
|
209
|
+
args: {
|
|
210
|
+
...baseArgs,
|
|
211
|
+
imageLinks: realImageLinks,
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// ─── AC9 — Light Background (dark text) ───────────────────────────────────────────────────
|
|
216
|
+
|
|
217
|
+
export const LightBackground: Story = {
|
|
218
|
+
decorators: [LightBgDecorator],
|
|
219
|
+
args: {
|
|
220
|
+
...baseArgs,
|
|
221
|
+
color: "dark",
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// ─── AC10 — Above the Fold (LCP priority) ────────────────────────────────────
|
|
226
|
+
|
|
227
|
+
export const AboveTheFold: Story = {
|
|
228
|
+
decorators: [DarkBgDecorator],
|
|
229
|
+
args: {
|
|
230
|
+
...baseArgs,
|
|
231
|
+
isAboveTheFold: true,
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
// ─── AC11 — Disclaimers ───────────────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
export const WithDisclaimers: Story = {
|
|
238
|
+
decorators: [DarkBgDecorator],
|
|
239
|
+
args: {
|
|
240
|
+
...baseArgs,
|
|
241
|
+
cta: primaryCta,
|
|
242
|
+
ctaDisclaimer: "* Offer valid for new customers only.",
|
|
243
|
+
disclaimer:
|
|
244
|
+
"*911 IN AN EMERGENCY. Voice Services provided via an internet connection require both electrical power and broadband function. The Services will not function if power is lost or if there is a disruption to the broadband connection.",
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// ─── All ACs — Full Featured ──────────────────────────────────────────────────
|
|
249
|
+
|
|
250
|
+
export const FullFeatured: Story = {
|
|
251
|
+
decorators: [DarkBgDecorator],
|
|
252
|
+
args: {
|
|
253
|
+
...baseArgs,
|
|
254
|
+
enableHeading: true,
|
|
255
|
+
cta: primaryCta,
|
|
256
|
+
secondaryCta: secondaryCta,
|
|
257
|
+
checklist: realChecklist,
|
|
258
|
+
imageLinks: realImageLinks,
|
|
259
|
+
ctaDisclaimer: "* Offer valid for new customers only.",
|
|
260
|
+
disclaimer:
|
|
261
|
+
"*911 IN AN EMERGENCY. Voice Services provided via an internet connection require both electrical power and broadband function. The Services will not function if power is lost or if there is a disruption to the broadband connection.",
|
|
262
|
+
isAboveTheFold: true,
|
|
263
|
+
},
|
|
264
|
+
};
|
|
@@ -1,23 +1,287 @@
|
|
|
1
1
|
import { PrimaryHero } from "./index";
|
|
2
|
+
import type { PrimaryHeroProps } from "./types";
|
|
2
3
|
|
|
3
4
|
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
import type { ArgTypes, Meta, StoryObj } from "@storybook/react";
|
|
6
|
+
|
|
7
|
+
// ─── Mock Data ────────────────────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
const HERO_IMAGE =
|
|
10
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/6Dpv8KVrKnuQXy0CCSHFa8/8cf420b6d55f6bdcfa443f7cff75e294/1a9b1046b0b507d52c57172edc6324f1417ff402.png";
|
|
11
|
+
|
|
12
|
+
const BADGE_IMAGE =
|
|
13
|
+
"https://images.ctfassets.net/8d4yn2ywtegc/7hlBQ8QOkl0fI8vawenlJK/216b89b30eb9ec3685f723696baeefdf/promo_badge__1_.svg";
|
|
14
|
+
|
|
15
|
+
const DEFAULT_CHECKLIST: PrimaryHeroProps["checklist"] = [
|
|
16
|
+
{ title: "100% network reliability" },
|
|
17
|
+
{ title: "Free Whole Home Wi-Fi Set Up" },
|
|
18
|
+
{ title: "Free Kinetic Secure for 3 months" },
|
|
19
|
+
{ title: "No annual contract or data caps" },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const CHECK_AVAILABILITY_CTA = {
|
|
23
|
+
showButtonAs: "solid" as const,
|
|
24
|
+
buttonVariant: "primary_brand" as const,
|
|
25
|
+
buttonLabel: "Check availability",
|
|
26
|
+
href: "#",
|
|
27
|
+
target: "_self" as const,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// ─── ArgTypes ─────────────────────────────────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
const argTypes: ArgTypes<PrimaryHeroProps> = {
|
|
33
|
+
title: {
|
|
34
|
+
control: { type: "text" as const },
|
|
35
|
+
description: "Main headline text displayed in the hero",
|
|
36
|
+
},
|
|
37
|
+
showAsHeading: {
|
|
38
|
+
control: { type: "boolean" as const },
|
|
39
|
+
description: "Renders title as h1 instead of h2",
|
|
40
|
+
},
|
|
41
|
+
subTitle: {
|
|
42
|
+
control: { type: "text" as const },
|
|
43
|
+
description:
|
|
44
|
+
"Subtitle text below the headline highlighting key value proposition",
|
|
45
|
+
},
|
|
46
|
+
price: {
|
|
47
|
+
control: { type: "text" as const },
|
|
48
|
+
description: "Price value (e.g. '24')",
|
|
49
|
+
},
|
|
50
|
+
priceSuffix: {
|
|
51
|
+
control: { type: "text" as const },
|
|
52
|
+
description: "Price suffix displayed after the price (e.g. '/mo')",
|
|
53
|
+
},
|
|
54
|
+
priceCallout: {
|
|
55
|
+
control: { type: "text" as const },
|
|
56
|
+
description:
|
|
57
|
+
"Price callout text, pipe-separated for multiple lines (e.g. 'Fiber plans|starting at')",
|
|
58
|
+
},
|
|
59
|
+
pricingDescription: {
|
|
60
|
+
control: { type: "text" as const },
|
|
61
|
+
description: "Descriptive text displayed below the pricing section",
|
|
62
|
+
},
|
|
63
|
+
pricingDescriptionDisclaimer: {
|
|
64
|
+
control: { type: "text" as const },
|
|
65
|
+
description: "Smaller disclaimer text below the pricing description",
|
|
66
|
+
},
|
|
67
|
+
checklist: {
|
|
68
|
+
control: { type: "object" as const },
|
|
69
|
+
description: "Array of checklist items with title and optional icon URL",
|
|
70
|
+
},
|
|
71
|
+
logoLockup: {
|
|
72
|
+
control: { type: "text" as const },
|
|
73
|
+
description: "URL for logo lockup image displayed below checklist",
|
|
74
|
+
},
|
|
75
|
+
carouselImages: {
|
|
76
|
+
control: { type: "object" as const },
|
|
77
|
+
description: "Array of hero image URLs",
|
|
78
|
+
},
|
|
79
|
+
squareImage: {
|
|
80
|
+
control: false,
|
|
81
|
+
table: { disable: true },
|
|
82
|
+
},
|
|
83
|
+
badgeImage: {
|
|
84
|
+
control: { type: "text" as const },
|
|
85
|
+
description: "URL for promo badge image overlaid on the hero image",
|
|
86
|
+
},
|
|
87
|
+
textColor: {
|
|
88
|
+
control: { type: "select" as const },
|
|
89
|
+
options: ["light", "dark"],
|
|
90
|
+
description:
|
|
91
|
+
"Text color theme — light (white) for dark backgrounds, dark for light backgrounds",
|
|
92
|
+
},
|
|
93
|
+
primaryCta1: {
|
|
94
|
+
control: { type: "object" as const },
|
|
95
|
+
description: "Primary call-to-action button props",
|
|
96
|
+
},
|
|
97
|
+
secondaryCtaPrefix: {
|
|
98
|
+
control: { type: "text" as const },
|
|
99
|
+
description: "Prefix text before the secondary CTA (e.g. 'Or')",
|
|
100
|
+
},
|
|
101
|
+
secondaryCta: {
|
|
102
|
+
control: { type: "object" as const },
|
|
103
|
+
description: "Secondary call-to-action link/button props",
|
|
104
|
+
},
|
|
105
|
+
bottomLink: {
|
|
106
|
+
control: { type: "object" as const },
|
|
107
|
+
description: "Bottom link rendered below the CTA section",
|
|
108
|
+
},
|
|
109
|
+
hideOnMobileCta1: {
|
|
110
|
+
control: { type: "boolean" as const },
|
|
111
|
+
description: "Hides the primary CTA on mobile viewports",
|
|
112
|
+
},
|
|
113
|
+
maxWidth: {
|
|
114
|
+
table: { disable: true },
|
|
115
|
+
},
|
|
116
|
+
checkAvailabilityEyebrow: {
|
|
117
|
+
control: { disable: true },
|
|
118
|
+
table: { disable: true },
|
|
119
|
+
},
|
|
120
|
+
renderCheckPlans: {
|
|
121
|
+
control: { disable: true },
|
|
122
|
+
table: { disable: true },
|
|
123
|
+
},
|
|
124
|
+
onModalButtonClick: {
|
|
125
|
+
control: { disable: true },
|
|
126
|
+
table: { disable: true },
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// ─── Meta ─────────────────────────────────────────────────────────────────────
|
|
5
131
|
|
|
6
132
|
const meta: Meta<typeof PrimaryHero> = {
|
|
7
133
|
title: "Contentful Blocks/PrimaryHero",
|
|
8
134
|
component: PrimaryHero,
|
|
9
135
|
tags: ["autodocs"],
|
|
136
|
+
argTypes,
|
|
10
137
|
parameters: {
|
|
11
|
-
layout: "
|
|
138
|
+
layout: "fullscreen",
|
|
12
139
|
docs: {
|
|
13
140
|
page: DocsPage,
|
|
14
141
|
description: {
|
|
15
|
-
component:
|
|
142
|
+
component:
|
|
143
|
+
"Contentful primary hero block featuring headline, subtitle, pricing, checklist, CTA buttons, logo lockup, and responsive hero image with optional promo badge.",
|
|
16
144
|
},
|
|
17
145
|
},
|
|
18
146
|
},
|
|
19
|
-
|
|
147
|
+
decorators: [
|
|
148
|
+
Story => (
|
|
149
|
+
<div style={{ minWidth: 1280 }}>
|
|
150
|
+
<Story />
|
|
151
|
+
</div>
|
|
152
|
+
),
|
|
153
|
+
],
|
|
154
|
+
args: {
|
|
155
|
+
title: "Internet better with ultra-fast fiber internet.",
|
|
156
|
+
showAsHeading: true,
|
|
157
|
+
price: "24",
|
|
158
|
+
priceSuffix: "/mo",
|
|
159
|
+
priceCallout: "Fiber plans|starting at",
|
|
160
|
+
checklist: DEFAULT_CHECKLIST,
|
|
161
|
+
logoLockup: undefined,
|
|
162
|
+
carouselImages: [HERO_IMAGE],
|
|
163
|
+
badgeImage: BADGE_IMAGE,
|
|
164
|
+
primaryCta1: CHECK_AVAILABILITY_CTA,
|
|
165
|
+
textColor: "dark",
|
|
166
|
+
},
|
|
20
167
|
};
|
|
168
|
+
|
|
21
169
|
export default meta;
|
|
22
170
|
type Story = StoryObj<typeof meta>;
|
|
171
|
+
|
|
172
|
+
// ─── Stories ──────────────────────────────────────────────────────────────────
|
|
173
|
+
|
|
174
|
+
/** Default hero with all main features: headline, pricing, checklist, logo lockup, badge, and hero image. */
|
|
23
175
|
export const Default: Story = {};
|
|
176
|
+
|
|
177
|
+
/** Promo badge overlaid on the hero image — draws attention to a limited-time offer. */
|
|
178
|
+
export const PromoBadge: Story = {
|
|
179
|
+
parameters: {
|
|
180
|
+
docs: {
|
|
181
|
+
description: {
|
|
182
|
+
story:
|
|
183
|
+
"Promo badge (e.g. $3.99 or limited-time price) is rendered as an overlay on the top-left corner of the hero image.",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
args: {
|
|
188
|
+
title: "Internet better with ultra-fast fiber internet.",
|
|
189
|
+
badgeImage: BADGE_IMAGE,
|
|
190
|
+
checklist: DEFAULT_CHECKLIST,
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/** Hero with only a headline — no subtitle or pricing. */
|
|
195
|
+
export const Headline: Story = {
|
|
196
|
+
parameters: {
|
|
197
|
+
docs: {
|
|
198
|
+
description: {
|
|
199
|
+
story:
|
|
200
|
+
"Displays only the headline text with checklist and CTA. Use when the hero needs minimal content.",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
args: {
|
|
205
|
+
title: "Hero headline.",
|
|
206
|
+
subTitle: undefined,
|
|
207
|
+
price: undefined,
|
|
208
|
+
priceSuffix: undefined,
|
|
209
|
+
priceCallout: undefined,
|
|
210
|
+
pricingDescription: undefined,
|
|
211
|
+
logoLockup: undefined,
|
|
212
|
+
badgeImage: undefined,
|
|
213
|
+
checklist: DEFAULT_CHECKLIST,
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/** Hero with subtitle text below the headline highlighting a key value proposition. */
|
|
218
|
+
export const SubTitle: Story = {
|
|
219
|
+
parameters: {
|
|
220
|
+
docs: {
|
|
221
|
+
description: {
|
|
222
|
+
story:
|
|
223
|
+
"Uses the subtitle property to display supporting text beneath the headline, reinforcing the value proposition.",
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
args: {
|
|
228
|
+
title: "Internet better with ultra-fast fiber internet.",
|
|
229
|
+
subTitle: "Subtitle highlighting key value proposition.",
|
|
230
|
+
price: undefined,
|
|
231
|
+
priceSuffix: undefined,
|
|
232
|
+
priceCallout: undefined,
|
|
233
|
+
pricingDescription: undefined,
|
|
234
|
+
logoLockup: undefined,
|
|
235
|
+
badgeImage: undefined,
|
|
236
|
+
checklist: DEFAULT_CHECKLIST,
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/** Hero with pricing callout section including price, suffix, description and disclaimer. */
|
|
241
|
+
export const PricingCallout: Story = {
|
|
242
|
+
parameters: {
|
|
243
|
+
docs: {
|
|
244
|
+
description: {
|
|
245
|
+
story:
|
|
246
|
+
"Displays the full pricing section with callout prefix, price value, suffix, and optional description/disclaimer text.",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
args: {
|
|
251
|
+
title: "Internet better with ultra-fast fiber internet.",
|
|
252
|
+
subTitle:
|
|
253
|
+
"Experience the joy of ultra-fast, reliable fiber internet in every room of your home.",
|
|
254
|
+
price: "24",
|
|
255
|
+
priceSuffix: "/mo",
|
|
256
|
+
priceCallout: "starting at",
|
|
257
|
+
pricingDescription: "pricing disclaimer text goes here",
|
|
258
|
+
logoLockup: undefined,
|
|
259
|
+
badgeImage: undefined,
|
|
260
|
+
checklist: undefined,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/** Bundle offer variant with different messaging and pricing. */
|
|
265
|
+
export const BundleOffer: Story = {
|
|
266
|
+
parameters: {
|
|
267
|
+
docs: {
|
|
268
|
+
description: {
|
|
269
|
+
story:
|
|
270
|
+
"Demonstrates the hero used for bundle/cross-sell offers with custom headline and pricing copy.",
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
args: {
|
|
275
|
+
title: "Bundle and save on Kinetic Fiber Internet.",
|
|
276
|
+
subTitle:
|
|
277
|
+
"Save $20/mo off your Kinetic bill with a new or existing AT&T Wireless plan*.",
|
|
278
|
+
price: undefined,
|
|
279
|
+
priceSuffix: undefined,
|
|
280
|
+
priceCallout: undefined,
|
|
281
|
+
pricingDescription: undefined,
|
|
282
|
+
pricingDescriptionDisclaimer: "Pricing disclaimer text goes here.",
|
|
283
|
+
logoLockup: undefined,
|
|
284
|
+
badgeImage: undefined,
|
|
285
|
+
checklist: undefined,
|
|
286
|
+
},
|
|
287
|
+
};
|