sapo-components-ui-rn 1.0.78 → 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.
- package/dist/index.esm.js +9 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Checkbox/index.tsx +2 -2
- package/src/components/RadioButton/index.tsx +3 -4
- package/src/components/TextInput/TextInputDefault.tsx +0 -5
- package/src/components/TextInput/TextInputFlat.tsx +0 -5
- package/src/components/TextInput/TextInputNumber.tsx +0 -2
- package/src/components/Toast/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const Checkbox = ({
|
|
|
48
48
|
const [isActive, setActive] = useState<boolean>(checked);
|
|
49
49
|
const checkboxColor = useCheckboxColor(isActive, disabled);
|
|
50
50
|
|
|
51
|
-
const
|
|
51
|
+
const handlePress = useCallback(() => {
|
|
52
52
|
// setActive(!isActive);
|
|
53
53
|
onPress?.();
|
|
54
54
|
}, [isActive, onPress]);
|
|
@@ -63,7 +63,7 @@ const Checkbox = ({
|
|
|
63
63
|
disabled={disabled}
|
|
64
64
|
alignCenter
|
|
65
65
|
style={[style]}
|
|
66
|
-
onPress={
|
|
66
|
+
onPress={handlePress}
|
|
67
67
|
>
|
|
68
68
|
{leftIcon ? (
|
|
69
69
|
<View paddingRight={CONSTANTS.SPACE_8}>{leftIcon}</View>
|
|
@@ -30,10 +30,9 @@ const RadioButton = ({
|
|
|
30
30
|
const { colors } = theme;
|
|
31
31
|
const [isActive, setActive] = useState<boolean>(checked);
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
setActive(!isActive);
|
|
33
|
+
const handlePress = useCallback(() => {
|
|
35
34
|
onPress?.();
|
|
36
|
-
}, [
|
|
35
|
+
}, [onPress]);
|
|
37
36
|
|
|
38
37
|
useEffect(() => {
|
|
39
38
|
setActive(checked);
|
|
@@ -55,7 +54,7 @@ const RadioButton = ({
|
|
|
55
54
|
disabled={disabled}
|
|
56
55
|
alignCenter
|
|
57
56
|
style={[style]}
|
|
58
|
-
onPress={
|
|
57
|
+
onPress={handlePress}
|
|
59
58
|
>
|
|
60
59
|
{leftIcon ? (
|
|
61
60
|
<View paddingRight={CONSTANTS.SPACE_8}>{leftIcon}</View>
|
|
@@ -376,11 +376,6 @@ const TextInputDefault = ({
|
|
|
376
376
|
fontWeight,
|
|
377
377
|
color: inputTextColor,
|
|
378
378
|
textAlignVertical: multiline ? "top" : "center",
|
|
379
|
-
textAlign: textAlign
|
|
380
|
-
? textAlign
|
|
381
|
-
: I18nManager.getConstants().isRTL
|
|
382
|
-
? "right"
|
|
383
|
-
: "left",
|
|
384
379
|
height: height ? height : 48,
|
|
385
380
|
paddingTop: getPaddingTopValue(),
|
|
386
381
|
paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0,
|
|
@@ -491,11 +491,6 @@ const TextInputFlat = ({
|
|
|
491
491
|
fontWeight,
|
|
492
492
|
color: inputTextColor,
|
|
493
493
|
textAlignVertical: multiline ? "top" : "center",
|
|
494
|
-
textAlign: textAlign
|
|
495
|
-
? textAlign
|
|
496
|
-
: I18nManager.getConstants().isRTL
|
|
497
|
-
? "right"
|
|
498
|
-
: "left",
|
|
499
494
|
marginTop: Platform.OS === "android" ? SPACE_8 : SPACE_2,
|
|
500
495
|
},
|
|
501
496
|
contentStyle,
|