sapo-components-ui-rn 1.0.13 → 1.0.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.
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ const TextInputDefault = ({
|
|
|
47
47
|
placeholderTextColor,
|
|
48
48
|
clearButton = false,
|
|
49
49
|
contentStyle,
|
|
50
|
-
value,
|
|
50
|
+
value = "",
|
|
51
51
|
...rest
|
|
52
52
|
}: ChildTextInputProps) => {
|
|
53
53
|
const { colors } = theme;
|
|
@@ -121,7 +121,10 @@ const TextInputDefault = ({
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
const renderLabel = () => {
|
|
124
|
-
if (
|
|
124
|
+
if (
|
|
125
|
+
parentState.focused ||
|
|
126
|
+
(parentState.value !== undefined && parentState.value?.toString() !== "")
|
|
127
|
+
) {
|
|
125
128
|
return (
|
|
126
129
|
<View paddingTop={CONSTANTS.SPACE_4}>
|
|
127
130
|
<Text color={getLabelColor()} size={MINIMIZED_LABEL_FONT_SIZE}>
|
|
@@ -216,10 +219,12 @@ const styles = StyleSheet.create({
|
|
|
216
219
|
margin: 0,
|
|
217
220
|
flex: 1,
|
|
218
221
|
height: 48,
|
|
222
|
+
paddingLeft: 0,
|
|
223
|
+
paddingTop: Platform.OS === "ios" ? CONSTANTS.SPACE_4 : CONSTANTS.SPACE_2,
|
|
219
224
|
},
|
|
220
225
|
clearButton: {
|
|
221
|
-
|
|
226
|
+
paddingRight: CONSTANTS.SPACE_12,
|
|
222
227
|
height: "100%",
|
|
223
|
-
paddingTop: CONSTANTS.
|
|
228
|
+
paddingTop: CONSTANTS.SPACE_12,
|
|
224
229
|
},
|
|
225
230
|
});
|