@thecb/components 11.2.3-beta.2 → 11.2.3-beta.4
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/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/registration-banner/RegistrationBanner.js +5 -4
- package/src/components/molecules/registration-banner/RegistrationBanner.mdx +4 -11
- package/src/components/molecules/registration-banner/RegistrationBanner.stories.js +4 -14
- package/src/components/molecules/registration-banner/RegistrationBanner.styled.js +1 -1
- package/src/components/molecules/registration-banner/index.d.ts +2 -3
package/package.json
CHANGED
|
@@ -14,12 +14,11 @@ import withWindowSize from "../../withWindowSize";
|
|
|
14
14
|
import Heading from "../../atoms/heading";
|
|
15
15
|
|
|
16
16
|
const RegistrationBanner = ({
|
|
17
|
-
|
|
17
|
+
clientName,
|
|
18
18
|
extraStyles,
|
|
19
19
|
loginLink = "/login",
|
|
20
20
|
registrationLink = "/registration",
|
|
21
21
|
themeValues,
|
|
22
|
-
title,
|
|
23
22
|
titleAs,
|
|
24
23
|
titleVariant
|
|
25
24
|
}) => {
|
|
@@ -32,6 +31,7 @@ const RegistrationBanner = ({
|
|
|
32
31
|
isMobile={isMobile}
|
|
33
32
|
role="banner"
|
|
34
33
|
aria-label="Registration Banner"
|
|
34
|
+
justify="center"
|
|
35
35
|
>
|
|
36
36
|
<Styled.ContentContainer
|
|
37
37
|
role="main"
|
|
@@ -48,7 +48,7 @@ const RegistrationBanner = ({
|
|
|
48
48
|
variant={titleVariant}
|
|
49
49
|
weight={FONT_WEIGHT_SEMIBOLD}
|
|
50
50
|
>
|
|
51
|
-
{
|
|
51
|
+
Register for a {clientName} Wallet Account
|
|
52
52
|
</Heading>
|
|
53
53
|
<Text
|
|
54
54
|
extraStyles={`
|
|
@@ -58,7 +58,8 @@ const RegistrationBanner = ({
|
|
|
58
58
|
fontSize={isMobile ? FONT_SIZE.SM : FONT_SIZE.LG}
|
|
59
59
|
color={themeValues.secondaryColor}
|
|
60
60
|
>
|
|
61
|
-
|
|
61
|
+
Save payment methods and information for fast, easy, and safe
|
|
62
|
+
payments with {clientName}
|
|
62
63
|
</Text>
|
|
63
64
|
</Box>
|
|
64
65
|
<Styled.ButtonContainer
|
|
@@ -6,17 +6,10 @@ import * as RegistrationBannerStories from './RegistrationBanner.stories.js';
|
|
|
6
6
|
|
|
7
7
|
<Title />
|
|
8
8
|
|
|
9
|
-
Originally used in the PayDot project, `RegistrationBanner` displays a promotional banner for user registration.
|
|
9
|
+
Originally used in the PayDot project, `RegistrationBanner` displays a promotional banner for user registration.
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- **Action Links**: Provides two main action links - one for registration ("Register Now") and another for logging in ("Log In"), each styled appropriately and including an icon for the registration link.
|
|
15
|
-
- **Accessibility**: Includes ARIA roles and labels to improve accessibility for users with disabilities.
|
|
16
|
-
- **Customizable Links**: Accepts `registrationLink` and `loginLink` props to customize the URLs for the registration and login links, defaulting to `/registration` and `/login` respectively.
|
|
11
|
+
- Title and Description: A `clientName` prop is passed, which displays within the title and description text.
|
|
12
|
+
- Responsive: Adjusts its layout and font sizes based on whether the user is on a mobile device, using the `isMobile` value from the theme context.
|
|
13
|
+
- Action Links: Provides two main action links - one for registration ("Register Now") and another for logging in ("Log In").
|
|
17
14
|
|
|
18
15
|
<Controls />
|
|
19
|
-
|
|
20
|
-
<div style={{ marginBottom: "2em"}}>
|
|
21
|
-
<Story />
|
|
22
|
-
</div>
|
|
@@ -9,31 +9,21 @@ const meta = {
|
|
|
9
9
|
},
|
|
10
10
|
tags: ["!autodocs"],
|
|
11
11
|
args: {
|
|
12
|
-
|
|
13
|
-
"Save payment methods and accounts to make interacting with Cityville fast, safe, and easy.",
|
|
12
|
+
clientName: "Cityville",
|
|
14
13
|
extraStyles: "",
|
|
15
|
-
title: "Register for a Cityville Wallet Account",
|
|
16
14
|
titleAs: "h1",
|
|
17
15
|
titleVariant: "h1",
|
|
18
16
|
registrationLink: "/registration",
|
|
19
17
|
loginLink: "/login"
|
|
20
18
|
},
|
|
21
19
|
argTypes: {
|
|
22
|
-
|
|
23
|
-
description: "Text to display in the RegistrationBanner's heading area",
|
|
24
|
-
table: {
|
|
25
|
-
type: { summary: "string" },
|
|
26
|
-
defaultValue: { summary: "Register for a Cityville Wallet Account" }
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
description: {
|
|
20
|
+
clientName: {
|
|
30
21
|
description:
|
|
31
|
-
"
|
|
22
|
+
"Name of the client using the RegistrationBanner (e.g. Cityville). This will be displayed in the title and description of the banner.",
|
|
32
23
|
table: {
|
|
33
24
|
type: { summary: "string" },
|
|
34
25
|
defaultValue: {
|
|
35
|
-
summary:
|
|
36
|
-
"Save payment methods and accounts to make interacting with Cityville fast, safe, and easy."
|
|
26
|
+
summary: "Cityville"
|
|
37
27
|
}
|
|
38
28
|
}
|
|
39
29
|
},
|
|
@@ -3,7 +3,7 @@ import { Box, Cluster, Stack } from "../../atoms/layouts";
|
|
|
3
3
|
import ButtonWithLink from "../../atoms/button-with-link/ButtonWithLink";
|
|
4
4
|
import { hexToRGBA } from "../../../util/general";
|
|
5
5
|
|
|
6
|
-
export const BannerContainer = styled(
|
|
6
|
+
export const BannerContainer = styled(Cluster)`
|
|
7
7
|
background: ${({ themeValues }) => hexToRGBA(themeValues.background, 0.9)};
|
|
8
8
|
padding: ${({ isMobile }) => (isMobile ? "1rem 2rem" : " 2rem 8.25rem")};
|
|
9
9
|
`;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Expand from "../../../util/expand";
|
|
3
|
-
import RegistrationBanner from "./index";
|
|
4
3
|
|
|
5
4
|
export interface RegistrationBannerProps {
|
|
6
|
-
|
|
5
|
+
clientName?: string;
|
|
7
6
|
extraStyles?: string;
|
|
8
7
|
loginLink?: string;
|
|
9
8
|
registrationLink?: string;
|
|
10
|
-
|
|
9
|
+
themeValues: any;
|
|
11
10
|
titleAs?: string;
|
|
12
11
|
titleVariant?: string;
|
|
13
12
|
}
|