@thecb/components 7.9.4-beta.0 → 7.9.4-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/dist/index.cjs.js +38 -33
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +38 -33
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +19 -15
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +2 -3
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@ const HiddenCheckbox = styled.input.attrs({ type: "checkbox" })`
|
|
|
44
44
|
|
|
45
45
|
const StyledCheckbox = styled.div`
|
|
46
46
|
display: inline-block;
|
|
47
|
-
margin
|
|
47
|
+
margin: ${({ checkboxMargin }) => checkboxMargin};
|
|
48
48
|
width: 24px;
|
|
49
49
|
height: 24px;
|
|
50
50
|
border-radius: 2px;
|
|
@@ -92,6 +92,7 @@ const Checkbox = ({
|
|
|
92
92
|
themeValues,
|
|
93
93
|
hidden = false,
|
|
94
94
|
error = false,
|
|
95
|
+
checkboxMargin = "0 16px 0 0",
|
|
95
96
|
extraStyles,
|
|
96
97
|
textExtraStyles
|
|
97
98
|
}) => {
|
|
@@ -138,6 +139,7 @@ const Checkbox = ({
|
|
|
138
139
|
disabledStyles={themeValues.disabledStyles}
|
|
139
140
|
disabledCheckedStyles={themeValues.disabledCheckedStyles}
|
|
140
141
|
focusedStyles={themeValues.focusedStyles}
|
|
142
|
+
checkboxMargin={checkboxMargin}
|
|
141
143
|
>
|
|
142
144
|
<CheckboxIcon
|
|
143
145
|
viewBox="0 0 24 24"
|
|
@@ -149,20 +151,22 @@ const Checkbox = ({
|
|
|
149
151
|
</CheckboxIcon>
|
|
150
152
|
</StyledCheckbox>
|
|
151
153
|
</CheckboxContainer>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
{title && (
|
|
155
|
+
<Text
|
|
156
|
+
variant="p"
|
|
157
|
+
weight={themeValues.textFontWeight}
|
|
158
|
+
color={themeValues.textColor}
|
|
159
|
+
extraStyles={
|
|
160
|
+
textExtraStyles
|
|
161
|
+
? `${textExtraStyles} ${disabled &&
|
|
162
|
+
`color: #6e727e; background-color: #f7f7f7;`} `
|
|
163
|
+
: `margin-left: 1rem ${disabled &&
|
|
164
|
+
`color: #6e727e; background-color: #f7f7f7;`}`
|
|
165
|
+
}
|
|
166
|
+
>
|
|
167
|
+
{title}
|
|
168
|
+
</Text>
|
|
169
|
+
)}
|
|
166
170
|
</CheckboxLabelContainer>
|
|
167
171
|
</Box>
|
|
168
172
|
);
|
|
@@ -39,18 +39,17 @@ const TermsAndConditionsControlV2 = ({
|
|
|
39
39
|
>
|
|
40
40
|
<Stack childGap="0.25rem">
|
|
41
41
|
{html && <Box padding="0">{html}</Box>}
|
|
42
|
-
<Cluster justify="flex-start" align="
|
|
42
|
+
<Cluster justify="flex-start" align="flex-start" nowrap>
|
|
43
43
|
{showCheckbox && (
|
|
44
44
|
<Checkbox
|
|
45
45
|
name={id}
|
|
46
|
-
title="Terms and Conditions"
|
|
47
46
|
error={hasError}
|
|
48
47
|
checked={isChecked}
|
|
49
48
|
onChange={onCheck}
|
|
50
49
|
/>
|
|
51
50
|
)}
|
|
52
51
|
<Stack childGap="0.25rem">
|
|
53
|
-
<Cluster justify="flex-start" align="
|
|
52
|
+
<Cluster justify="flex-start" align="flex-start" nowrap>
|
|
54
53
|
{description && (
|
|
55
54
|
<Text color={CHARADE_GREY}>{description} </Text>
|
|
56
55
|
)}
|