hplx-react-elements-dev 1.1.13 → 1.1.14
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, isMarked, onClick }: CheckboxProps) => JSX.Element;
|
|
3
|
+
declare const Checkbox: ({ size, text, secondaryText, disabled, isMarked, onClick, id, }: CheckboxProps) => JSX.Element;
|
|
4
4
|
export default Checkbox;
|
package/dist/esm/index.js
CHANGED
|
@@ -3760,14 +3760,15 @@ var Checkbox = function Checkbox(_a) {
|
|
|
3760
3760
|
_d = _a.isMarked,
|
|
3761
3761
|
isMarked = _d === void 0 ? false : _d,
|
|
3762
3762
|
_e = _a.onClick,
|
|
3763
|
-
onClick = _e === void 0 ? function () {} : _e
|
|
3763
|
+
onClick = _e === void 0 ? function () {} : _e,
|
|
3764
|
+
id = _a.id;
|
|
3764
3765
|
|
|
3765
3766
|
var _f = useState(false),
|
|
3766
3767
|
isChecked = _f[0],
|
|
3767
3768
|
setCheck = _f[1];
|
|
3768
3769
|
|
|
3769
3770
|
var OnButtonClick = function OnButtonClick() {
|
|
3770
|
-
onClick();
|
|
3771
|
+
onClick(id);
|
|
3771
3772
|
setCheck(function (prevValue) {
|
|
3772
3773
|
return !prevValue;
|
|
3773
3774
|
});
|
|
@@ -3777,7 +3778,8 @@ var Checkbox = function Checkbox(_a) {
|
|
|
3777
3778
|
setCheck(isMarked);
|
|
3778
3779
|
}, [isMarked]);
|
|
3779
3780
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
3780
|
-
className: "hplxt-flex"
|
|
3781
|
+
className: "hplxt-flex",
|
|
3782
|
+
id: id
|
|
3781
3783
|
}, {
|
|
3782
3784
|
children: [jsxRuntime.exports.jsx("div", {
|
|
3783
3785
|
"data-testid": "box",
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -192,8 +192,9 @@ export interface CheckboxProps {
|
|
|
192
192
|
text: string;
|
|
193
193
|
secondaryText?: string;
|
|
194
194
|
disabled?: boolean;
|
|
195
|
-
onClick?: () => void;
|
|
195
|
+
onClick?: (id: CheckboxProps) => void;
|
|
196
196
|
isMarked?: boolean;
|
|
197
|
+
id?: any;
|
|
197
198
|
}
|
|
198
199
|
type ButtonGroupOptionType = {
|
|
199
200
|
value?: string;
|