dhre-ui-kit 0.0.195 → 0.0.197
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/lib/index.d.ts +1 -0
- package/lib/index.js +16 -8
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +16 -8
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -970,7 +970,8 @@ const Checkbox = ({
|
|
|
970
970
|
uncheckedIcon,
|
|
971
971
|
titleVariant = "L1_REGULAR",
|
|
972
972
|
titleStyle,
|
|
973
|
-
containerStyle
|
|
973
|
+
containerStyle,
|
|
974
|
+
onPress
|
|
974
975
|
}) => {
|
|
975
976
|
const [checked, setChecked] = React.useState(isChecked || false);
|
|
976
977
|
React.useEffect(() => {
|
|
@@ -981,20 +982,27 @@ const Checkbox = ({
|
|
|
981
982
|
onCheck && onCheck(!checked);
|
|
982
983
|
};
|
|
983
984
|
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { testID, style: containerStyle }, /* @__PURE__ */ React__default["default"].createElement(
|
|
984
|
-
reactNative.
|
|
985
|
+
reactNative.View,
|
|
985
986
|
{
|
|
986
|
-
testID: "Checkbox-Press",
|
|
987
|
-
onPress: handlePress,
|
|
988
|
-
disabled: disable,
|
|
989
987
|
style: styles$w.directionStyle
|
|
990
988
|
},
|
|
991
|
-
/* @__PURE__ */ React__default["default"].createElement(
|
|
989
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
990
|
+
reactNative.Pressable,
|
|
991
|
+
{
|
|
992
|
+
testID: "Checkbox-Press",
|
|
993
|
+
onPress: handlePress,
|
|
994
|
+
disabled: disable,
|
|
995
|
+
style: styles$w.checkboxContainer
|
|
996
|
+
},
|
|
997
|
+
React__default["default"].cloneElement(checked ? checkedIcon : uncheckedIcon)
|
|
998
|
+
),
|
|
992
999
|
/* @__PURE__ */ React__default["default"].createElement(
|
|
993
1000
|
CustomTypography,
|
|
994
1001
|
{
|
|
995
1002
|
variant: titleVariant,
|
|
996
1003
|
text: labelName,
|
|
997
|
-
style: titleStyle
|
|
1004
|
+
style: titleStyle,
|
|
1005
|
+
onPress
|
|
998
1006
|
}
|
|
999
1007
|
)
|
|
1000
1008
|
));
|
|
@@ -4689,7 +4697,7 @@ const styles = reactNative.StyleSheet.create({
|
|
|
4689
4697
|
});
|
|
4690
4698
|
|
|
4691
4699
|
const RadioButtonGroup = ({ data, onSelect, containerStyle, labelStyle }) => {
|
|
4692
|
-
const [selectedOption, setSelectedOption] = React.useState(
|
|
4700
|
+
const [selectedOption, setSelectedOption] = React.useState(data[0]?.value);
|
|
4693
4701
|
const handleSelect = (item) => {
|
|
4694
4702
|
setSelectedOption(item.value);
|
|
4695
4703
|
onSelect(item);
|