File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { TextInput , TextInputProps } from 'react-native' ;
3- import { useTheme } from " @shopify/restyle"
4- import { Theme } from '../../theme'
2+ import { Platform , TextInput , TextInputProps } from 'react-native' ;
3+ import { useTheme } from ' @shopify/restyle' ;
4+ import { Theme } from '../../theme' ;
55
66const Input = ( { value, onChange, ...others } : TextInputProps & { onChange ?: ( value : string ) => void } ) => {
7- const theme = useTheme < Theme > ( )
7+ const theme = useTheme < Theme > ( ) ;
8+ const isIOS = Platform . OS === 'ios' ;
89 return (
910 < TextInput
1011 value = { value }
1112 onChangeText = { ( value ) => {
1213 onChange ?.( value ) ;
1314 } }
14- style = { { color : theme . colors . text } }
15+ style = { { paddingVertical : isIOS ? 5 : - 5 , color : theme . colors . text } }
1516 { ...others }
1617 />
1718 ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const styles = StyleSheet.create({
2020 width : 'auto' ,
2121 fontSize : 16 ,
2222 fontWeight : '500' ,
23- marginBottom : 10 ,
23+ marginBottom : 5 ,
2424 } ,
2525} ) ;
2626
Original file line number Diff line number Diff line change 11import React , { useContext } from 'react' ;
22import { Context } from '../hooks/context' ;
33import { FormItemsProps } from '../types' ;
4- import { Text } from 'react-native' ;
4+ import { View , Text } from 'react-native' ;
55
66const Tip = ( { v } : { v : Partial < FormItemsProps > & { field : string } } ) => {
77 const {
@@ -11,7 +11,11 @@ const Tip = ({ v }: { v: Partial<FormItemsProps> & { field: string } }) => {
1111 const content = validator . message ( v . field , store [ v . field ] , {
1212 validate : v ?. validate ,
1313 } ) ;
14- return < Text style = { { color : 'red' , marginBottom : content && 10 , marginTop : content && 10 } } > { content } </ Text > ;
14+ return (
15+ < View style = { { marginTop : 5 } } >
16+ { content && < Text style = { { color : 'red' , marginBottom : content && 5 } } > { content } </ Text > }
17+ </ View >
18+ ) ;
1519} ;
1620
1721export default Tip ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const styles = StyleSheet.create({
99 } ,
1010 form_items : {
1111 textAlign : 'center' ,
12- margin : 10 ,
12+ margin : 5 ,
1313 borderBottomWidth : 0.5 ,
1414 borderBottomColor : '#ccc' ,
1515 } ,
You can’t perform that action at this time.
0 commit comments