hplx-react-elements-dev 1.0.79 → 1.0.80

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.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { CheckboxProps } from "../types";
3
- declare const Checkbox: ({ size, text, secondaryText, disabled, onClick }: CheckboxProps) => JSX.Element;
3
+ declare const Checkbox: ({ size, text, secondaryText, disabled, isMarked, onClick }: CheckboxProps) => JSX.Element;
4
4
  export default Checkbox;
package/dist/esm/index.js CHANGED
@@ -3565,12 +3565,14 @@ var Checkbox = function Checkbox(_a) {
3565
3565
  secondaryText = _a.secondaryText,
3566
3566
  _c = _a.disabled,
3567
3567
  disabled = _c === void 0 ? false : _c,
3568
- _d = _a.onClick,
3569
- onClick = _d === void 0 ? function () {} : _d;
3568
+ _d = _a.isMarked,
3569
+ isMarked = _d === void 0 ? false : _d,
3570
+ _e = _a.onClick,
3571
+ onClick = _e === void 0 ? function () {} : _e;
3570
3572
 
3571
- var _e = useState(false),
3572
- isChecked = _e[0],
3573
- setCheck = _e[1];
3573
+ var _f = useState(false),
3574
+ isChecked = _f[0],
3575
+ setCheck = _f[1];
3574
3576
 
3575
3577
  var OnButtonClick = function OnButtonClick() {
3576
3578
  onClick();
@@ -3579,6 +3581,9 @@ var Checkbox = function Checkbox(_a) {
3579
3581
  });
3580
3582
  };
3581
3583
 
3584
+ useEffect(function () {
3585
+ setCheck(isMarked);
3586
+ }, [isMarked]);
3582
3587
  return jsxRuntime.exports.jsxs("div", __assign({
3583
3588
  className: "hplxt-flex"
3584
3589
  }, {
@@ -172,6 +172,7 @@ export interface CheckboxProps {
172
172
  secondaryText?: string;
173
173
  disabled?: boolean;
174
174
  onClick?: () => void;
175
+ isMarked?: boolean;
175
176
  }
176
177
  type ButtonGroupOptionType = {
177
178
  value?: string;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.79",
12
+ "version": "1.0.80",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",