React Native Elements Theme Provider无法正常工作?

时间:2019-06-10 20:53:10

标签: react-native react-native-elements

我很确定我正在按照说明使用它,但是文本没有改变:

{
sw.WriteLine($"{now} {typeOfTransaction} \t ${transacAmnt:0.00} ${currentbalance:0.00}");
}


Expected Output:
6/10/2019 4:15:44 PM Added Money         $10.00 $10.00
6/10/2019 4:15:53 PM Cloud Popcorn A4    $10.00 $6.35
6/10/2019 4:15:55 PM Cash Out            $6.35 $0.00

Actual Output:
6/10/2019 4:15:44 PM Added Money         $10.00 $10.00
6/10/2019 4:15:53 PM Cloud Popcorn A4    $10.00 $6.35
6/10/2019 4:15:55 PM Cash Out    $6.35 $0.00

我在做什么错??

1 个答案:

答案 0 :(得分:1)

我通过将其嵌套在style下来使其正常工作:

const theme = {
  Text: {
    style: {
      color: "red"
    }
  }
};

我对<ThemeProvider>不太熟悉,它的documentation并未明确表明<Text>的风格应归于style的支持之下。您可能需要进一步尝试。 :)