@ludo.ninja/components 2.3.3 → 2.3.5

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.
@@ -140,6 +140,13 @@ const StyledCardContent = styled_components_1.default.div `
140
140
  line-height: 16px;
141
141
  font-family: ${vars_1.poppinsFontVarCss.css};
142
142
  margin-top: 12px;
143
+ display: inline-flex;
144
+ justify-content: space-between;
145
+ flex-wrap: wrap;
146
+ .participantsCount {
147
+ color: ${colors_1.TextGrayColor};
148
+ ${typography_1.FH6}
149
+ }
143
150
  }
144
151
  }
145
152
  }
@@ -182,12 +189,6 @@ const StyledCardContent = styled_components_1.default.div `
182
189
  line-height: ${(0, _4k_1.adaptiveValueCalc)(16)};
183
190
  margin-top: ${(0, _4k_1.adaptiveValueCalc)(12)};
184
191
  }
185
-
186
- .participantsCount {
187
- display: inline-flex;
188
- justify-content: space-between;
189
- flex-wrap: wrap;
190
- }
191
192
  }
192
193
  }
193
194
 
@@ -18,6 +18,7 @@ interface Props {
18
18
  withInput?: boolean;
19
19
  innerTextInputRef?: UseFormRegisterReturn;
20
20
  disabled?: boolean;
21
+ checked?: boolean;
21
22
  }
22
23
  declare const CheckboxInput: React.FC<Props>;
23
24
  export default CheckboxInput;
@@ -50,8 +50,8 @@ const BasicCheckbox = styled_components_1.default.label `
50
50
  border-radius: 6px;
51
51
  }
52
52
  `;
53
- const CheckboxInput = ({ data, label, register, error, className, value, withInput, innerTextInputRef, disabled, }) => {
54
- const [textInputDisabled, setTextInputDisabled] = (0, react_1.useState)(true);
53
+ const CheckboxInput = ({ data, label, register, error, className, value, withInput, innerTextInputRef, disabled, checked, }) => {
54
+ const [textInputDisabled, setTextInputDisabled] = (0, react_1.useState)(!checked);
55
55
  const renderError = () => {
56
56
  if (error?.isNeedShowError) {
57
57
  return (0, jsx_runtime_1.jsx)(ErrorLabel_1.default, { children: error?.message });
@@ -60,6 +60,6 @@ const CheckboxInput = ({ data, label, register, error, className, value, withInp
60
60
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(BasicCheckbox, { className: className, status: error?.isNeedShowError, children: [(0, jsx_runtime_1.jsx)("input", { ...register, onChange: (e) => {
61
61
  setTextInputDisabled(!e.target.checked);
62
62
  register.onChange(e);
63
- }, className: "input", type: "checkbox", name: data.name, value: value, disabled: disabled }), (0, jsx_runtime_1.jsx)("p", { className: "checkmark" }), label, withInput && (0, jsx_runtime_1.jsx)(Input_1.StyledInput, { status: false, ...innerTextInputRef, disabled: textInputDisabled })] }), renderError()] }));
63
+ }, className: "input", type: "checkbox", name: data.name, value: value, disabled: disabled, checked: checked }), (0, jsx_runtime_1.jsx)("p", { className: "checkmark" }), label, withInput && (0, jsx_runtime_1.jsx)(Input_1.StyledInput, { status: false, ...innerTextInputRef, disabled: textInputDisabled })] }), renderError()] }));
64
64
  };
65
65
  exports.default = CheckboxInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",