@thecb/components 12.1.0-beta.0 → 12.1.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "12.1.0-beta.0",
3
+ "version": "12.1.0-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -173,7 +173,7 @@ const PaymentFormACH = ({
173
173
  />
174
174
  )}
175
175
  {(showWalletCheckbox || showTerms) && (
176
- <Cluster childGap={"4px"} align="center">
176
+ <Cluster childGap={"4px"} align="center" overflow>
177
177
  {showWalletCheckbox && (
178
178
  <Checkbox
179
179
  name="bank checkbox"
@@ -191,6 +191,7 @@ const PaymentFormACH = ({
191
191
  description="View"
192
192
  terms={termsContent}
193
193
  initialFocusSelector={".modal-close-button"}
194
+ textExtraStyles="vertical-align: middle; margin-left: 40px;" /* determined w 24px checkbox width + 16px margin */
194
195
  />
195
196
  </Cover>
196
197
  )}
@@ -119,3 +119,15 @@ export const WithAccountType = {
119
119
  },
120
120
  render: args => <ConnectedForm {...args} />
121
121
  };
122
+
123
+ export const WithWalletCheckboxAndTermsAndConditions = {
124
+ args: {
125
+ showWalletCheckbox: true,
126
+ termsContent: "View Terms and Conditions"
127
+ },
128
+ render: args => (
129
+ <div style={{ width: "100%", maxWidth: "560px" }}>
130
+ <ConnectedForm {...args} />
131
+ </div>
132
+ )
133
+ };
@@ -197,7 +197,7 @@ const PaymentFormCard = ({
197
197
  </Box>
198
198
  )}
199
199
  {(showWalletCheckbox || showTerms) && (
200
- <Cluster childGap={"4px"} align="center">
200
+ <Cluster childGap={"4px"} align="center" overflow>
201
201
  {showWalletCheckbox && (
202
202
  <Checkbox
203
203
  name="credit card checkbox"
@@ -215,6 +215,7 @@ const PaymentFormCard = ({
215
215
  description="View"
216
216
  terms={termsContent}
217
217
  initialFocusSelector={".modal-close-button"}
218
+ textExtraStyles="vertical-align: middle; margin-left: 40px;" /* determined w 24px checkbox width + 16px margin */
218
219
  />
219
220
  </Cover>
220
221
  )}
@@ -4,7 +4,6 @@ import { createStore } from "redux";
4
4
  import PaymentFormCard from "./PaymentFormCard";
5
5
  import * as PaymentFormCardState from "./PaymentFormCard.state";
6
6
  import { noop } from "../../../util/general";
7
- import { fn } from "@storybook/test";
8
7
 
9
8
  const store = createStore(
10
9
  PaymentFormCardState.reducer,
@@ -118,3 +117,15 @@ export const WithDeniedCards = {
118
117
  },
119
118
  render: args => <ConnectedForm {...args} />
120
119
  };
120
+
121
+ export const WithWalletCheckboxAndTermsAndConditions = {
122
+ args: {
123
+ showWalletCheckbox: true,
124
+ termsContent: "View Terms and Conditions"
125
+ },
126
+ render: args => (
127
+ <div style={{ width: "100%", maxWidth: "560px" }}>
128
+ <ConnectedForm {...args} />
129
+ </div>
130
+ )
131
+ };
@@ -30,7 +30,8 @@ const TermsAndConditionsControlV2 = ({
30
30
  checkboxMargin = "4px 8px 4px 4px",
31
31
  modalTitle = "Terms and Conditions",
32
32
  initialFocusSelector = "",
33
- isRequired = false
33
+ isRequired = false,
34
+ textExtraStyles = ""
34
35
  }) => {
35
36
  const [showTerms, toggleShowTerms] = useState(false);
36
37
  const standardBoxShadow = generateShadows().standard.base;
@@ -70,7 +71,7 @@ const TermsAndConditionsControlV2 = ({
70
71
  justify="flex-start"
71
72
  align="center"
72
73
  nowrap
73
- extraStyles={`padding-right: 2px; > div > * { margin: 4px 2px; };`}
74
+ extraStyles={`padding-right: 2px; > div > * { margin: 4px 2px; }; ${textExtraStyles}`}
74
75
  id={TermsAndConditionsTitleDivId}
75
76
  >
76
77
  {description && <Text color={CHARADE_GREY}>{description}</Text>}