Răsfoiți Sursa

Bugfix: TextInput line height problems fixed.

lfabl 3 luni în urmă
părinte
comite
005168feb1

+ 1 - 1
example/src/index.tsx

@@ -40,7 +40,7 @@ const App = () => {
             }}
             type="success"
             title="Ahmet"
-            variant="ghost"
+            variant="filled"
         />
     </View>;
 };

+ 1 - 0
src/components/textInput/index.tsx

@@ -420,6 +420,7 @@ const TextInput: RefForwardingComponent<ITextInputRef, ITextInputProps> = ({
     const renderInput = () => {
         return <NativeTextInput
             {...props}
+            placeholderTextColor={currentType.placeholderColor}
             secureTextEntry={variant === "hidden" && hideValue}
             underlineColorAndroid="rgba(255,255,255,0)"
             placeholder={placeholder}

+ 6 - 0
src/components/textInput/stylesheet.ts

@@ -110,8 +110,14 @@ const stylesheet = StyleSheet.create({
     },
     input: {
         backgroundColor: "transparent",
+        textAlignVertical: "center",
         borderColor: "transparent",
+        paddingBottom: 0,
+        paddingRight: 0,
+        paddingLeft: 0,
         borderWidth: 0,
+        paddingTop: 0,
+        minHeight: 20,
         width: "100%",
         zIndex: 99
     },

+ 3 - 3
src/variants/themes/default.json

@@ -155,7 +155,7 @@
                 "fontFamily": "Geist",
                 "fontWeight": "400",
                 "fontSize": 14,
-                "lineHeight": 20,
+                "lineHeight": 14,
                 "letterSpacing": 0.1
             },
             "labelMediumSize": {
@@ -262,7 +262,7 @@
                 "fontFamily": "Geist",
                 "fontWeight": "400",
                 "fontSize": 12,
-                "lineHeight": 16,
+                "lineHeight": 12,
                 "letterSpacing": 0.5
             },
             "labelMediumSize": {
@@ -664,4 +664,4 @@
             }
         }
     ]
-}
+}