Mah*_*ous 6 react-native expo react-native-paper
我想在焦点之前更改此代码中的颜色或边框,我想要红色,在焦点上我想要黄色。
这是我的作品 https://prnt.sc/o8evi5
这是我拥有的代码,我正在使用 React Native Paper https://callstack.github.io/react-native-paper/text-input.html
<TextInput
label='Email or username'
mode='outlined'
theme={{ colors: { underlineColor:'red',}}}
style={(this.state.isFocused) ? {borderColor: 'black', borderColor: 'black',} : {fontStyle: 'italic', color: 'white'}}
selectionColor='red'
underlineColor='red'
placeholder='name@example.com'
keyboardType='email-address'
underlineColorAndroid='transparent'
autoCorrect='false'
autoCapitalize='none'
onChangeText={formikProps.handleChange('email')}
onBlur={formikProps.handleBlur('email')}
//autoFocus
/>
Run Code Online (Sandbox Code Playgroud)
我试过了,但它没有给我我想要的 https://github.com/callstack/react-native-paper/issues/656
Mah*_*ous 21
此代码在 TextInput 标签内工作。
theme={{ colors: { primary: 'green',underlineColor:'transparent',}}}
Run Code Online (Sandbox Code Playgroud)
使用primary,您可以更改焦点的边框颜色。参考:https : //github.com/callstack/react-native-paper/issues/656
| 归档时间: |
|
| 查看次数: |
9674 次 |
| 最近记录: |