我很确定我正在按照说明使用它,但文字没有改变:
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";
import { ThemeProvider, Text } from "react-native-elements";
import Customer from "../models/Customer";
class CustomerScreen extends Component {
render() {
return (
<View style={styles.container}>
<ThemeProvider theme={theme}>
<Text h1>{customer.fullName}</Text>
<Text>{customer.email}</Text>
<Text>{customer.phone}</Text>
</ThemeProvider>
</View>
);
}
}
const styles = {
container: {
flex: 1,
marginTop: 50,
marginLeft: 20,
justifyContent: "flex-start",
alignItems: "flex-start"
}
};
const theme = {
Text: {
color: "red"
}
};
export default CustomerScreen;
我究竟做错了什么??