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.mjs
CHANGED
|
@@ -937,7 +937,8 @@ const Checkbox = ({
|
|
|
937
937
|
uncheckedIcon,
|
|
938
938
|
titleVariant = "L1_REGULAR",
|
|
939
939
|
titleStyle,
|
|
940
|
-
containerStyle
|
|
940
|
+
containerStyle,
|
|
941
|
+
onPress
|
|
941
942
|
}) => {
|
|
942
943
|
const [checked, setChecked] = useState(isChecked || false);
|
|
943
944
|
useEffect(() => {
|
|
@@ -948,20 +949,27 @@ const Checkbox = ({
|
|
|
948
949
|
onCheck && onCheck(!checked);
|
|
949
950
|
};
|
|
950
951
|
return /* @__PURE__ */ React.createElement(View, { testID, style: containerStyle }, /* @__PURE__ */ React.createElement(
|
|
951
|
-
|
|
952
|
+
View,
|
|
952
953
|
{
|
|
953
|
-
testID: "Checkbox-Press",
|
|
954
|
-
onPress: handlePress,
|
|
955
|
-
disabled: disable,
|
|
956
954
|
style: styles$w.directionStyle
|
|
957
955
|
},
|
|
958
|
-
/* @__PURE__ */ React.createElement(
|
|
956
|
+
/* @__PURE__ */ React.createElement(
|
|
957
|
+
Pressable,
|
|
958
|
+
{
|
|
959
|
+
testID: "Checkbox-Press",
|
|
960
|
+
onPress: handlePress,
|
|
961
|
+
disabled: disable,
|
|
962
|
+
style: styles$w.checkboxContainer
|
|
963
|
+
},
|
|
964
|
+
React.cloneElement(checked ? checkedIcon : uncheckedIcon)
|
|
965
|
+
),
|
|
959
966
|
/* @__PURE__ */ React.createElement(
|
|
960
967
|
CustomTypography,
|
|
961
968
|
{
|
|
962
969
|
variant: titleVariant,
|
|
963
970
|
text: labelName,
|
|
964
|
-
style: titleStyle
|
|
971
|
+
style: titleStyle,
|
|
972
|
+
onPress
|
|
965
973
|
}
|
|
966
974
|
)
|
|
967
975
|
));
|
|
@@ -4656,7 +4664,7 @@ const styles = StyleSheet.create({
|
|
|
4656
4664
|
});
|
|
4657
4665
|
|
|
4658
4666
|
const RadioButtonGroup = ({ data, onSelect, containerStyle, labelStyle }) => {
|
|
4659
|
-
const [selectedOption, setSelectedOption] = useState(
|
|
4667
|
+
const [selectedOption, setSelectedOption] = useState(data[0]?.value);
|
|
4660
4668
|
const handleSelect = (item) => {
|
|
4661
4669
|
setSelectedOption(item.value);
|
|
4662
4670
|
onSelect(item);
|