如何更改时间文本颜色?
How can I change time text color?
我使用 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-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',
},
}}
/>
);
};