在 Focus React Native Paper 上更改 TextInput 样式

Pir*_*aru 5 android reactjs react-native react-native-android react-native-paper

首先,我研究了其他帖子并找到了很多解决方案,但在 React Native Paper 中没有任何效果?

我需要在 React Native Paper 中更改 TextInput Style on Focus

小智 5

const { isActive } = this.state;
const customStyle = isActive ? styles.customText : {};


<TextInput
    label='Email'
    value={this.state.text}
    style={customStyle}
    onFocus={() => this.setState({ isActive: true, })}
    onBlur={() => this.setState({ isActive: false, })}
    onChangeText={text => this.setState({ text })}
/>
Run Code Online (Sandbox Code Playgroud)