如何在'react-native-paper'中更改文本输入的错误颜色



主题化或TextInput文档中没有记录错误样式的"reat-native-paper">所以问题是如何在"react native paper"中为TextInput更改error={true}颜色?

在中不换行的示例

<PaperProvider>
<App />
</PaperProvider>

在这里:

import { TextInput, DefaultTheme } from 'react-native-paper'
.....
return (
.....
<TextInput
value={...}
.....
theme={{
...DefaultTheme,
colors: {
.....
error: '#B22D1D', //any color
.....
},
fonts: {
.....
},
}}
.....
/>
.....
)

相关内容

最新更新