Search code examples
react-nativereact-native-gifted-chat

How can I change time text color?


I use react-native-gifted-chat for my chat. I want to change time font color. I changed it as the doc said, but its not changing. I want both time colors are black. using "react-native-gifted-chat": "^0.16.1"

  const renderTime = (props) => {
    return (
      <Time
      {...props}
        textStyle={{
          left: {
            color: 'black',
          },
          right: {
            color: 'black',
          },
        }}
      />
    );
  };

Solution

  • Looks like you need to pass timeTextStyle instead of textStyle.

    Try:

      const renderTime = (props) => {
        return (
          <Time
          {...props}
            timeTextStyle={{
              left: {
                color: 'black',
              },
              right: {
                color: 'black',
              },
            }}
          />
        );
      };