@thecb/components 9.2.11-beta.0 → 9.2.11
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 +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +1 -0
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +4 -2
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +0 -3
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ export const termsAndConditions = () => (
|
|
|
15
15
|
html={text("html", "terms and conditions summary", groupId)}
|
|
16
16
|
terms={text("terms", "terms and conditions modal text", groupId)}
|
|
17
17
|
error={boolean("error", false, groupId)}
|
|
18
|
+
description={text("description", "I definitely agree to the", groupId)}
|
|
18
19
|
/>
|
|
19
20
|
);
|
|
20
21
|
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
} from "../../../constants/colors";
|
|
11
11
|
import { generateShadows } from "../../../util/generateShadows";
|
|
12
12
|
import { useScrollTo } from "../../../hooks";
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
const TermsAndConditionsTitleDivId = "terms-and-conditions-title";
|
|
14
15
|
|
|
15
16
|
const TermsAndConditionsControlV2 = ({
|
|
16
17
|
showCheckbox = true,
|
|
@@ -58,7 +59,7 @@ const TermsAndConditionsControlV2 = ({
|
|
|
58
59
|
onChange={onCheck}
|
|
59
60
|
checkboxMargin={checkboxMargin}
|
|
60
61
|
extraStyles={`align-self: flex-start;`}
|
|
61
|
-
labelledById={
|
|
62
|
+
labelledById={TermsAndConditionsTitleDivId}
|
|
62
63
|
/>
|
|
63
64
|
)}
|
|
64
65
|
<Stack childGap="0.25rem" fullHeight>
|
|
@@ -67,6 +68,7 @@ const TermsAndConditionsControlV2 = ({
|
|
|
67
68
|
align="center"
|
|
68
69
|
nowrap
|
|
69
70
|
extraStyles={`padding-right: 2px; > div > * { margin: 4px 2px; };`}
|
|
71
|
+
id={TermsAndConditionsTitleDivId}
|
|
70
72
|
>
|
|
71
73
|
{description && <Text color={CHARADE_GREY}>{description}</Text>}
|
|
72
74
|
{terms && (
|
|
@@ -5,8 +5,6 @@ import { Box } from "../../atoms/layouts";
|
|
|
5
5
|
import { fallbackValues } from "./TermsAndConditionsModal.theme";
|
|
6
6
|
import { themeComponent } from "../../../util/themeUtils";
|
|
7
7
|
|
|
8
|
-
export const TermsAndConditionsModalLinkId = "terms-and-conditions-link";
|
|
9
|
-
|
|
10
8
|
const TermsAndConditionsModal = ({
|
|
11
9
|
link,
|
|
12
10
|
title = "Terms & Conditions",
|
|
@@ -46,7 +44,6 @@ const TermsAndConditionsModal = ({
|
|
|
46
44
|
}}
|
|
47
45
|
>
|
|
48
46
|
<Text
|
|
49
|
-
id={TermsAndConditionsModalLinkId}
|
|
50
47
|
variant={linkVariant}
|
|
51
48
|
onClick={() => toggleOpen(true)}
|
|
52
49
|
onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
|