我使用 react-native-gifted-chat 进行聊天。我想更改时间字体颜色。我按照医生说的改了,但是没有改。我想要两种时间颜色都是黑色的。 使用“react-native-gifted-chat”:“^0.16.1”
const renderTime = (props) => {
return (
<Time
{...props}
textStyle={{
left: {
color: 'black',
},
right: {
color: 'black',
},
}}
/>
);
};
最佳答案
看来您需要通过 timeTextStyle
而不是 textStyle
.
试试:
const renderTime = (props) => {
return (
<Time
{...props}
timeTextStyle={{
left: {
color: 'black',
},
right: {
color: 'black',
},
}}
/>
);
};
关于react-native - 如何更改时间文本颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62633170/