@thecb/components 7.10.3 → 7.10.4-beta.1
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 +239 -265
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +239 -265
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +9 -18
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +9 -18
package/package.json
CHANGED
|
@@ -15,8 +15,7 @@ import {
|
|
|
15
15
|
import AccountAndRoutingModal from "../account-and-routing-modal";
|
|
16
16
|
import { noop } from "../../../util/general";
|
|
17
17
|
import { Cluster, Cover } from "../../atoms/layouts";
|
|
18
|
-
import
|
|
19
|
-
import Text from "../../atoms/text";
|
|
18
|
+
import TermsAndConditions from "../terms-and-conditions";
|
|
20
19
|
|
|
21
20
|
const PaymentFormACH = ({
|
|
22
21
|
variant = "default",
|
|
@@ -32,17 +31,14 @@ const PaymentFormACH = ({
|
|
|
32
31
|
showWalletCheckbox,
|
|
33
32
|
saveToWallet,
|
|
34
33
|
walletCheckboxMarked,
|
|
35
|
-
termsContent
|
|
36
|
-
termsTitle = "Terms & Conditions"
|
|
34
|
+
termsContent
|
|
37
35
|
}) => {
|
|
38
36
|
if (clearOnDismount) {
|
|
39
37
|
useEffect(() => () => actions.form.clear(), []);
|
|
40
38
|
}
|
|
41
39
|
const [showRouting, toggleShowRouting] = useState(false);
|
|
42
40
|
const [showAccount, toggleShowAccount] = useState(false);
|
|
43
|
-
const [termsModalOpen, setTermsModalOpen] = useState(false);
|
|
44
41
|
const showTerms = !!termsContent;
|
|
45
|
-
const showTermsLinkVariant = showWalletCheckbox ? "p" : "pS";
|
|
46
42
|
|
|
47
43
|
const nameErrors = {
|
|
48
44
|
[required.error]: "Name is required"
|
|
@@ -162,7 +158,7 @@ const PaymentFormACH = ({
|
|
|
162
158
|
/>
|
|
163
159
|
)}
|
|
164
160
|
{(showWalletCheckbox || showTerms) && (
|
|
165
|
-
<Cluster childGap={"4px"}>
|
|
161
|
+
<Cluster childGap={"4px"} align="center">
|
|
166
162
|
{showWalletCheckbox && (
|
|
167
163
|
<Checkbox
|
|
168
164
|
name="bank checkbox"
|
|
@@ -173,17 +169,12 @@ const PaymentFormACH = ({
|
|
|
173
169
|
)}
|
|
174
170
|
{showTerms && (
|
|
175
171
|
<Cover singleChild>
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
title={termsTitle}
|
|
183
|
-
isOpen={termsModalOpen}
|
|
184
|
-
toggleOpen={setTermsModalOpen}
|
|
185
|
-
/>
|
|
186
|
-
</Cluster>
|
|
172
|
+
<TermsAndConditions
|
|
173
|
+
version="v2"
|
|
174
|
+
showCheckbox={false}
|
|
175
|
+
description="View"
|
|
176
|
+
terms={termsContent}
|
|
177
|
+
/>
|
|
187
178
|
</Cover>
|
|
188
179
|
)}
|
|
189
180
|
</Cluster>
|
|
@@ -28,8 +28,7 @@ import {
|
|
|
28
28
|
} from "../../atoms/form-layouts";
|
|
29
29
|
import { Box, Cluster, Cover } from "../../atoms/layouts";
|
|
30
30
|
import withWindowSize from "../../withWindowSize";
|
|
31
|
-
import
|
|
32
|
-
import Text from "../../atoms/text";
|
|
31
|
+
import TermsAndConditions from "../terms-and-conditions";
|
|
33
32
|
|
|
34
33
|
const PaymentFormCard = ({
|
|
35
34
|
variant = "default",
|
|
@@ -43,13 +42,10 @@ const PaymentFormCard = ({
|
|
|
43
42
|
saveToWallet,
|
|
44
43
|
walletCheckboxMarked,
|
|
45
44
|
deniedCards,
|
|
46
|
-
termsContent
|
|
47
|
-
termsTitle = "Terms & Conditions"
|
|
45
|
+
termsContent
|
|
48
46
|
}) => {
|
|
49
47
|
const { isMobile } = useContext(ThemeContext);
|
|
50
|
-
const [termsModalOpen, setTermsModalOpen] = useState(false);
|
|
51
48
|
const showTerms = !!termsContent;
|
|
52
|
-
const showTermsLinkVariant = showWalletCheckbox ? "p" : "pS";
|
|
53
49
|
|
|
54
50
|
useEffect(() => {
|
|
55
51
|
if (deniedCards) {
|
|
@@ -186,7 +182,7 @@ const PaymentFormCard = ({
|
|
|
186
182
|
</Box>
|
|
187
183
|
)}
|
|
188
184
|
{(showWalletCheckbox || showTerms) && (
|
|
189
|
-
<Cluster childGap={"4px"}>
|
|
185
|
+
<Cluster childGap={"4px"} align="center">
|
|
190
186
|
{showWalletCheckbox && (
|
|
191
187
|
<Checkbox
|
|
192
188
|
name="credit card checkbox"
|
|
@@ -197,17 +193,12 @@ const PaymentFormCard = ({
|
|
|
197
193
|
)}
|
|
198
194
|
{showTerms && (
|
|
199
195
|
<Cover singleChild>
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
title={termsTitle}
|
|
207
|
-
isOpen={termsModalOpen}
|
|
208
|
-
toggleOpen={setTermsModalOpen}
|
|
209
|
-
/>
|
|
210
|
-
</Cluster>
|
|
196
|
+
<TermsAndConditions
|
|
197
|
+
version="v2"
|
|
198
|
+
showCheckbox={false}
|
|
199
|
+
description="View"
|
|
200
|
+
terms={termsContent}
|
|
201
|
+
/>
|
|
211
202
|
</Cover>
|
|
212
203
|
)}
|
|
213
204
|
</Cluster>
|