@thecb/components 3.5.6 → 3.5.7
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 +629 -390
- package/package.json +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.state.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.stories.js +24 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.stories.js +24 -0
- package/.tool-versions +0 -1
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@ const PaymentFormACH = ({
|
|
|
53
53
|
};
|
|
54
54
|
const accountNumberErrors = {
|
|
55
55
|
[required.error]: "Account number is required",
|
|
56
|
-
[hasLength.error]: "Account number must be between
|
|
56
|
+
[hasLength.error]: "Account number must be between 5 and 17 digits"
|
|
57
57
|
};
|
|
58
58
|
const confirmAccountNumberErrors = {
|
|
59
59
|
[matchesField.error]:
|
|
@@ -20,7 +20,7 @@ const formConfig = {
|
|
|
20
20
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
21
21
|
},
|
|
22
22
|
accountNumber: {
|
|
23
|
-
validators: [required(), hasLength(
|
|
23
|
+
validators: [required(), hasLength(5, 17)],
|
|
24
24
|
constraints: [onlyIntegers(), hasLength(0, 17)]
|
|
25
25
|
},
|
|
26
26
|
confirmAccountNumber: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "react-redux";
|
|
3
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
+
|
|
5
|
+
import PaymentFormACH from "./PaymentFormACH";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
7
|
+
import * as PaymentFormACHState from "./PaymentFormACH.state";
|
|
8
|
+
|
|
9
|
+
const story = page({
|
|
10
|
+
title: "Components|Molecules/PaymentFormACH",
|
|
11
|
+
Component: PaymentFormACH,
|
|
12
|
+
reducer: PaymentFormACHState.reducer,
|
|
13
|
+
mapStateToProps: PaymentFormACHState.mapStateToProps,
|
|
14
|
+
mapDispatchToProps: PaymentFormACHState.mapDispatchToProps
|
|
15
|
+
});
|
|
16
|
+
export default story;
|
|
17
|
+
|
|
18
|
+
const ConnectedForm = connect(
|
|
19
|
+
PaymentFormACHState.mapStateToProps,
|
|
20
|
+
PaymentFormACHState.mapDispatchToProps
|
|
21
|
+
)(PaymentFormACH);
|
|
22
|
+
export const paymentFormACH = () => (
|
|
23
|
+
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "react-redux";
|
|
3
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
+
|
|
5
|
+
import PaymentFormCard from "./PaymentFormCard";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
7
|
+
import * as PaymentFormCardState from "./PaymentFormCard.state";
|
|
8
|
+
|
|
9
|
+
const story = page({
|
|
10
|
+
title: "Components|Molecules/PaymentFormCard",
|
|
11
|
+
Component: PaymentFormCard,
|
|
12
|
+
reducer: PaymentFormCardState.reducer,
|
|
13
|
+
mapStateToProps: PaymentFormCardState.mapStateToProps,
|
|
14
|
+
mapDispatchToProps: PaymentFormCardState.mapDispatchToProps
|
|
15
|
+
});
|
|
16
|
+
export default story;
|
|
17
|
+
|
|
18
|
+
const ConnectedForm = connect(
|
|
19
|
+
PaymentFormCardState.mapStateToProps,
|
|
20
|
+
PaymentFormCardState.mapDispatchToProps
|
|
21
|
+
)(PaymentFormCard);
|
|
22
|
+
export const paymentFormCard = () => (
|
|
23
|
+
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
+
);
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|