@thecb/components 4.1.17 → 4.1.19
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 +35 -50
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +1 -0
- package/src/components/atoms/form-select/FormSelect.js +6 -4
- package/src/components/atoms/form-select/FormSelect.styled.js +0 -17
- package/src/components/molecules/partial-amount-form/PartialAmountForm.js +3 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.js +15 -17
package/dist/index.cjs.js
CHANGED
|
@@ -18408,7 +18408,7 @@ function _templateObject8() {
|
|
|
18408
18408
|
}
|
|
18409
18409
|
|
|
18410
18410
|
function _templateObject7() {
|
|
18411
|
-
var data = _taggedTemplateLiteral(["\n display: inline-block;\n width: 24px;\n height: 24px;\n border-radius: 2px;\n transition: all 150ms;\n\n ", " {\n visibility: ", ";\n }\n\n ", ";\n"]);
|
|
18411
|
+
var data = _taggedTemplateLiteral(["\n display: inline-block;\n margin-right: 16px;\n width: 24px;\n height: 24px;\n border-radius: 2px;\n transition: all 150ms;\n\n ", " {\n visibility: ", ";\n }\n\n ", ";\n"]);
|
|
18412
18412
|
|
|
18413
18413
|
_templateObject7 = function _templateObject7() {
|
|
18414
18414
|
return data;
|
|
@@ -19128,18 +19128,8 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19128
19128
|
|
|
19129
19129
|
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
|
|
19130
19130
|
|
|
19131
|
-
function _templateObject4$3() {
|
|
19132
|
-
var data = _taggedTemplateLiteral([""]);
|
|
19133
|
-
|
|
19134
|
-
_templateObject4$3 = function _templateObject4() {
|
|
19135
|
-
return data;
|
|
19136
|
-
};
|
|
19137
|
-
|
|
19138
|
-
return data;
|
|
19139
|
-
}
|
|
19140
|
-
|
|
19141
19131
|
function _templateObject3$6() {
|
|
19142
|
-
var data = _taggedTemplateLiteral(["
|
|
19132
|
+
var data = _taggedTemplateLiteral([""]);
|
|
19143
19133
|
|
|
19144
19134
|
_templateObject3$6 = function _templateObject3() {
|
|
19145
19135
|
return data;
|
|
@@ -19149,7 +19139,7 @@ function _templateObject3$6() {
|
|
|
19149
19139
|
}
|
|
19150
19140
|
|
|
19151
19141
|
function _templateObject2$c() {
|
|
19152
|
-
var data = _taggedTemplateLiteral(["\n
|
|
19142
|
+
var data = _taggedTemplateLiteral(["\n border: 1px solid\n ", ";\n border-radius: 2px;\n height: 48px;\n width: 100%;\n padding: 0.75rem 1rem;\n min-width: 100px;\n margin: 0;\n box-sizing: border-box;\n position: relative;\n font-size: 1.1rem;\n font-family: Public Sans;\n line-height: 2rem;\n font-weight: ", ";\n background-color: ", ";\n color: ", ";\n box-shadow: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n"]);
|
|
19153
19143
|
|
|
19154
19144
|
_templateObject2$c = function _templateObject2() {
|
|
19155
19145
|
return data;
|
|
@@ -19168,23 +19158,18 @@ function _templateObject$o() {
|
|
|
19168
19158
|
return data;
|
|
19169
19159
|
}
|
|
19170
19160
|
var SelectContainer = styled__default.div(_templateObject$o());
|
|
19171
|
-
var
|
|
19161
|
+
var SelectField = styled__default.select(_templateObject2$c(), function (_ref) {
|
|
19172
19162
|
var field = _ref.field,
|
|
19173
19163
|
showErrors = _ref.showErrors;
|
|
19174
|
-
return field.dirty && field.hasErrors || field.hasErrors && showErrors ? ERROR_COLOR : STORM_GREY;
|
|
19175
|
-
}, FONT_WEIGHT_REGULAR);
|
|
19176
|
-
var SelectField = styled__default.select(_templateObject3$6(), function (_ref2) {
|
|
19177
|
-
var field = _ref2.field,
|
|
19178
|
-
showErrors = _ref2.showErrors;
|
|
19179
19164
|
return field.dirty && field.hasErrors || field.hasErrors && showErrors ? ERROR_COLOR : GHOST_GREY;
|
|
19180
|
-
}, FONT_WEIGHT_REGULAR, function (
|
|
19181
|
-
var themeValues =
|
|
19165
|
+
}, FONT_WEIGHT_REGULAR, function (_ref2) {
|
|
19166
|
+
var themeValues = _ref2.themeValues;
|
|
19182
19167
|
return themeValues.inputBackgroundColor && themeValues.inputBackgroundColor;
|
|
19183
|
-
}, function (
|
|
19184
|
-
var themeValues =
|
|
19168
|
+
}, function (_ref3) {
|
|
19169
|
+
var themeValues = _ref3.themeValues;
|
|
19185
19170
|
return themeValues.color && themeValues.color;
|
|
19186
19171
|
}, MATISSE_BLUE);
|
|
19187
|
-
var SelectOption = styled__default.option(
|
|
19172
|
+
var SelectOption = styled__default.option(_templateObject3$6());
|
|
19188
19173
|
|
|
19189
19174
|
var linkColor$1 = {
|
|
19190
19175
|
"default": "".concat(MATISSE_BLUE),
|
|
@@ -19290,8 +19275,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19290
19275
|
variant: "pS",
|
|
19291
19276
|
color: themeValues.labelColor,
|
|
19292
19277
|
weight: themeValues.fontWeight,
|
|
19293
|
-
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }"
|
|
19278
|
+
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
19279
|
+
id: labelTextWhenNoError.replace(/\s+/g, "-")
|
|
19294
19280
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
19281
|
+
"aria-labelledby": labelTextWhenNoError.replace(/\s+/g, "-"),
|
|
19295
19282
|
maxHeight: dropdownMaxHeight,
|
|
19296
19283
|
placeholder: options[0] ? options[0].text : "",
|
|
19297
19284
|
options: options,
|
|
@@ -19307,9 +19294,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19307
19294
|
onClick: function onClick() {
|
|
19308
19295
|
return setOpen(!open);
|
|
19309
19296
|
}
|
|
19310
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
19311
|
-
|
|
19312
|
-
|
|
19297
|
+
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
19298
|
+
direction: "row",
|
|
19299
|
+
justify: "space-between"
|
|
19313
19300
|
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
19314
19301
|
color: ERROR_COLOR,
|
|
19315
19302
|
variant: "pXS",
|
|
@@ -20513,10 +20500,10 @@ var fallbackValues$h = {
|
|
|
20513
20500
|
hoverFocusStyles: hoverFocusStyles$1
|
|
20514
20501
|
};
|
|
20515
20502
|
|
|
20516
|
-
function _templateObject4$
|
|
20503
|
+
function _templateObject4$3() {
|
|
20517
20504
|
var data = _taggedTemplateLiteral(["\n ", "\n "]);
|
|
20518
20505
|
|
|
20519
|
-
_templateObject4$
|
|
20506
|
+
_templateObject4$3 = function _templateObject4() {
|
|
20520
20507
|
return data;
|
|
20521
20508
|
};
|
|
20522
20509
|
|
|
@@ -20597,7 +20584,7 @@ var FormattedInputField = styled__default(function (_ref7) {
|
|
|
20597
20584
|
return themeValues.color && themeValues.color;
|
|
20598
20585
|
}, MATISSE_BLUE, function (_ref12) {
|
|
20599
20586
|
var extraStyles = _ref12.extraStyles;
|
|
20600
|
-
return styled.css(_templateObject4$
|
|
20587
|
+
return styled.css(_templateObject4$3(), extraStyles);
|
|
20601
20588
|
});
|
|
20602
20589
|
|
|
20603
20590
|
var FormInput = function FormInput(_ref13) {
|
|
@@ -21352,10 +21339,10 @@ function _templateObject5$2() {
|
|
|
21352
21339
|
return data;
|
|
21353
21340
|
}
|
|
21354
21341
|
|
|
21355
|
-
function _templateObject4$
|
|
21342
|
+
function _templateObject4$4() {
|
|
21356
21343
|
var data = _taggedTemplateLiteral(["", " is not a valid length"]);
|
|
21357
21344
|
|
|
21358
|
-
_templateObject4$
|
|
21345
|
+
_templateObject4$4 = function _templateObject4() {
|
|
21359
21346
|
return data;
|
|
21360
21347
|
};
|
|
21361
21348
|
|
|
@@ -21431,7 +21418,7 @@ with interpolation.
|
|
|
21431
21418
|
*/
|
|
21432
21419
|
|
|
21433
21420
|
|
|
21434
|
-
var DEFAULT_ERROR_MESSAGES = (_DEFAULT_ERROR_MESSAG = {}, _defineProperty(_DEFAULT_ERROR_MESSAG, MIN_LENGTH_ERROR, genErrorMessage(_templateObject$t(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MAX_LENGTH_ERROR, genErrorMessage(_templateObject2$h(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EXACT_LENGTH_ERROR, genErrorMessage(_templateObject3$9(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MULTIPLE_LENGTHS_ERROR, genErrorMessage(_templateObject4$
|
|
21421
|
+
var DEFAULT_ERROR_MESSAGES = (_DEFAULT_ERROR_MESSAG = {}, _defineProperty(_DEFAULT_ERROR_MESSAG, MIN_LENGTH_ERROR, genErrorMessage(_templateObject$t(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MAX_LENGTH_ERROR, genErrorMessage(_templateObject2$h(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EXACT_LENGTH_ERROR, genErrorMessage(_templateObject3$9(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MULTIPLE_LENGTHS_ERROR, genErrorMessage(_templateObject4$4(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EMAIL_ERROR, genErrorMessage(_templateObject5$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_NUMBER_ERROR, genErrorMessage(_templateObject6$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_UPPERCASE_LETTER_ERROR, genErrorMessage(_templateObject7$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_LOWERCASE_LETTER_ERROR, genErrorMessage(_templateObject8$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_SPECIAL_CHARACTER_ERROR, genErrorMessage(_templateObject9$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_NUMBERS_ERROR, genErrorMessage(_templateObject10$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_LETTERS_ERROR, genErrorMessage(_templateObject11$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, REQUIRED_FIELD_ERROR, genErrorMessage(_templateObject12(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_GREATER_THAN_ERROR, genErrorMessage(_templateObject13(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_LESS_THAN_ERROR, genErrorMessage(_templateObject14(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MATCHES_FIELD_ERROR, genErrorMessage(_templateObject15(), "fieldLabel", "matchField")), _defineProperty(_DEFAULT_ERROR_MESSAG, VALID_SELECT_OPTION_ERROR, genErrorMessage(_templateObject16(), "fieldLabel")), _DEFAULT_ERROR_MESSAG); // Constants to represent an input's state
|
|
21435
21422
|
// Neutral - has not been validated
|
|
21436
21423
|
// Invalid - has been validated and has an error
|
|
21437
21424
|
// Valid - has been validated and has no error
|
|
@@ -32394,10 +32381,10 @@ var fallbackValues$r = {
|
|
|
32394
32381
|
leftLabelStyles: leftLabelStyles
|
|
32395
32382
|
};
|
|
32396
32383
|
|
|
32397
|
-
function _templateObject4$
|
|
32384
|
+
function _templateObject4$5() {
|
|
32398
32385
|
var data = _taggedTemplateLiteral(["\n position: absolute;\n width: 14px;\n height: 14px;\n top: 3px;\n left: 3px;\n right: 3px;\n bottom: 3px;\n border-radius: 50%;\n box-sizing: border-box;\n"]);
|
|
32399
32386
|
|
|
32400
|
-
_templateObject4$
|
|
32387
|
+
_templateObject4$5 = function _templateObject4() {
|
|
32401
32388
|
return data;
|
|
32402
32389
|
};
|
|
32403
32390
|
|
|
@@ -32451,7 +32438,7 @@ var VisibleSwitchComponent = styled__default.label(_templateObject2$i(), functio
|
|
|
32451
32438
|
return isMobile ? "transform: scale(0.75)" : "";
|
|
32452
32439
|
});
|
|
32453
32440
|
var ToggleSwitchMiddleRingComponent = styled__default.div(_templateObject3$a());
|
|
32454
|
-
var ToggleSwitchInnerRingComponent = styled__default.div(_templateObject4$
|
|
32441
|
+
var ToggleSwitchInnerRingComponent = styled__default.div(_templateObject4$5());
|
|
32455
32442
|
|
|
32456
32443
|
var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
32457
32444
|
var _ref6$isOn = _ref6.isOn,
|
|
@@ -34824,10 +34811,10 @@ function _templateObject5$3() {
|
|
|
34824
34811
|
return data;
|
|
34825
34812
|
}
|
|
34826
34813
|
|
|
34827
|
-
function _templateObject4$
|
|
34814
|
+
function _templateObject4$6() {
|
|
34828
34815
|
var data = _taggedTemplateLiteral(["\n color: ", ";\n align-items: center;\n font-size: 1rem;\n padding-right: 1rem;\n cursor: pointer;\n display: ", ";\n"]);
|
|
34829
34816
|
|
|
34830
|
-
_templateObject4$
|
|
34817
|
+
_templateObject4$6 = function _templateObject4() {
|
|
34831
34818
|
return data;
|
|
34832
34819
|
};
|
|
34833
34820
|
|
|
@@ -34881,7 +34868,7 @@ var EditableTableListItem = styled__default.div(_templateObject2$k(), function (
|
|
|
34881
34868
|
return isMobile ? "padding: 1rem 0.5rem" : "padding: 0 0.5rem";
|
|
34882
34869
|
});
|
|
34883
34870
|
var EditableListItemControls$1 = styled__default.div(_templateObject3$b());
|
|
34884
|
-
var EditableListAction = styled__default.div(_templateObject4$
|
|
34871
|
+
var EditableListAction = styled__default.div(_templateObject4$6(), MATISSE_BLUE, function (_ref6) {
|
|
34885
34872
|
var hide = _ref6.hide;
|
|
34886
34873
|
return hide ? "none" : "flex";
|
|
34887
34874
|
});
|
|
@@ -38539,10 +38526,10 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
|
38539
38526
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
38540
38527
|
variant: variant,
|
|
38541
38528
|
role: "form",
|
|
38542
|
-
"aria-label": "
|
|
38529
|
+
"aria-label": "Other amount"
|
|
38543
38530
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
38544
38531
|
variant: "p"
|
|
38545
|
-
}, "Pay a
|
|
38532
|
+
}, "Pay a different amount. The total balance will still be due on the same due date."), /*#__PURE__*/React__default.createElement("div", {
|
|
38546
38533
|
style: {
|
|
38547
38534
|
height: "16px"
|
|
38548
38535
|
}
|
|
@@ -40102,24 +40089,22 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
|
40102
40089
|
showTerms = _useState2[0],
|
|
40103
40090
|
toggleShowTerms = _useState2[1];
|
|
40104
40091
|
|
|
40105
|
-
return /*#__PURE__*/React__default.createElement(DisplayBox$1, null, /*#__PURE__*/React__default.createElement(Stack, {
|
|
40106
|
-
direction: "row"
|
|
40107
|
-
}, /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40092
|
+
return /*#__PURE__*/React__default.createElement(DisplayBox$1, null, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40108
40093
|
name: "terms",
|
|
40094
|
+
title: "Terms and Conditions",
|
|
40109
40095
|
error: error,
|
|
40110
40096
|
checked: isChecked,
|
|
40111
40097
|
onChange: onCheck
|
|
40112
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
40113
|
-
|
|
40114
|
-
|
|
40115
|
-
}, "Terms and Conditions"), /*#__PURE__*/React__default.createElement(Box, {
|
|
40098
|
+
}), /*#__PURE__*/React__default.createElement(Box, {
|
|
40099
|
+
padding: "0 0 0 58px"
|
|
40100
|
+
}, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
40116
40101
|
padding: "0"
|
|
40117
40102
|
}, html), terms && /*#__PURE__*/React__default.createElement(TermsAndConditionsModal$1, {
|
|
40118
40103
|
link: "Learn More",
|
|
40119
40104
|
terms: terms,
|
|
40120
40105
|
isOpen: showTerms,
|
|
40121
40106
|
toggleOpen: toggleShowTerms
|
|
40122
|
-
}))));
|
|
40107
|
+
})))));
|
|
40123
40108
|
};
|
|
40124
40109
|
|
|
40125
40110
|
var Timeout = function Timeout(_ref) {
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
2
2
|
import Dropdown from "../dropdown";
|
|
3
3
|
import Text from "../text";
|
|
4
4
|
import { ERROR_COLOR } from "../../../constants/colors";
|
|
5
|
-
import { SelectContainer
|
|
5
|
+
import { SelectContainer } from "./FormSelect.styled";
|
|
6
6
|
import { fallbackValues } from "./FormSelect.theme";
|
|
7
7
|
import { themeComponent } from "../../../util/themeUtils";
|
|
8
|
-
import { Box, Cluster } from "../layouts";
|
|
8
|
+
import { Box, Cluster, Stack } from "../layouts";
|
|
9
9
|
|
|
10
10
|
const FormSelect = ({
|
|
11
11
|
fieldActions,
|
|
@@ -49,12 +49,14 @@ const FormSelect = ({
|
|
|
49
49
|
&::first-letter {
|
|
50
50
|
text-transform: uppercase;
|
|
51
51
|
}`}
|
|
52
|
+
id={labelTextWhenNoError.replace(/\s+/g, "-")}
|
|
52
53
|
>
|
|
53
54
|
{labelTextWhenNoError}
|
|
54
55
|
</Text>
|
|
55
56
|
</Cluster>
|
|
56
57
|
</Box>
|
|
57
58
|
<Dropdown
|
|
59
|
+
aria-labelledby={labelTextWhenNoError.replace(/\s+/g, "-")}
|
|
58
60
|
maxHeight={dropdownMaxHeight}
|
|
59
61
|
placeholder={options[0] ? options[0].text : ""}
|
|
60
62
|
options={options}
|
|
@@ -69,7 +71,7 @@ const FormSelect = ({
|
|
|
69
71
|
}
|
|
70
72
|
onClick={() => setOpen(!open)}
|
|
71
73
|
/>
|
|
72
|
-
<
|
|
74
|
+
<Stack direction="row" justify="space-between">
|
|
73
75
|
{(field.hasErrors && field.dirty) || (field.hasErrors && showErrors) ? (
|
|
74
76
|
<Text
|
|
75
77
|
color={ERROR_COLOR}
|
|
@@ -86,7 +88,7 @@ const FormSelect = ({
|
|
|
86
88
|
) : (
|
|
87
89
|
<Text extraStyles={`height: ${themeValues.lineHeight};`} />
|
|
88
90
|
)}
|
|
89
|
-
</
|
|
91
|
+
</Stack>
|
|
90
92
|
</SelectContainer>
|
|
91
93
|
);
|
|
92
94
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import {
|
|
3
|
-
STORM_GREY,
|
|
4
3
|
GHOST_GREY,
|
|
5
4
|
ERROR_COLOR,
|
|
6
5
|
MATISSE_BLUE
|
|
@@ -18,22 +17,6 @@ export const SelectContainer = styled.div`
|
|
|
18
17
|
}
|
|
19
18
|
`;
|
|
20
19
|
|
|
21
|
-
export const SelectLabel = styled.label`
|
|
22
|
-
color: ${({ field, showErrors }) =>
|
|
23
|
-
(field.dirty && field.hasErrors) || (field.hasErrors && showErrors)
|
|
24
|
-
? ERROR_COLOR
|
|
25
|
-
: STORM_GREY};
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
line-height: 18px;
|
|
28
|
-
font-weight: ${FONT_WEIGHT_REGULAR};
|
|
29
|
-
margin-bottom: 4px;
|
|
30
|
-
font-family: Public Sans;
|
|
31
|
-
|
|
32
|
-
&::first-letter {
|
|
33
|
-
text-transform: uppercase;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
20
|
export const SelectField = styled.select`
|
|
38
21
|
border: 1px solid
|
|
39
22
|
${({ field, showErrors }) =>
|
|
@@ -39,10 +39,10 @@ const PartialAmountForm = ({
|
|
|
39
39
|
|
|
40
40
|
const lineItemsNew = Array.isArray(lineItems) ? lineItems : [];
|
|
41
41
|
return (
|
|
42
|
-
<FormContainer variant={variant} role="form" aria-label="
|
|
42
|
+
<FormContainer variant={variant} role="form" aria-label="Other amount">
|
|
43
43
|
<Text variant="p">
|
|
44
|
-
Pay a
|
|
45
|
-
due
|
|
44
|
+
Pay a different amount. The total balance will still be due on the same
|
|
45
|
+
due date.
|
|
46
46
|
</Text>
|
|
47
47
|
<div style={{ height: "16px" }}></div>
|
|
48
48
|
<FormInputColumn>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import Checkbox from "../../atoms/checkbox";
|
|
3
|
-
import Text from "../../atoms/text";
|
|
4
3
|
import { Box, Stack } from "../../atoms/layouts";
|
|
5
4
|
import DisplayBox from "../../atoms/display-box";
|
|
6
|
-
import { FONT_WEIGHT_BOLD } from "../../../constants/style_constants";
|
|
7
5
|
import TermsAndConditionsModal from "../../molecules/terms-and-conditions-modal";
|
|
8
6
|
|
|
9
7
|
const TermsAndConditions = ({
|
|
@@ -16,27 +14,27 @@ const TermsAndConditions = ({
|
|
|
16
14
|
const [showTerms, toggleShowTerms] = useState(false);
|
|
17
15
|
return (
|
|
18
16
|
<DisplayBox>
|
|
19
|
-
<Stack
|
|
17
|
+
<Stack>
|
|
20
18
|
<Checkbox
|
|
21
19
|
name="terms"
|
|
20
|
+
title="Terms and Conditions"
|
|
22
21
|
error={error}
|
|
23
22
|
checked={isChecked}
|
|
24
23
|
onChange={onCheck}
|
|
25
24
|
/>
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</Stack>
|
|
25
|
+
<Box padding="0 0 0 58px">
|
|
26
|
+
<Stack>
|
|
27
|
+
<Box padding="0">{html}</Box>
|
|
28
|
+
{terms && (
|
|
29
|
+
<TermsAndConditionsModal
|
|
30
|
+
link="Learn More"
|
|
31
|
+
terms={terms}
|
|
32
|
+
isOpen={showTerms}
|
|
33
|
+
toggleOpen={toggleShowTerms}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
</Stack>
|
|
37
|
+
</Box>
|
|
40
38
|
</Stack>
|
|
41
39
|
</DisplayBox>
|
|
42
40
|
);
|