【发布时间】:2020-08-01 08:04:33
【问题描述】:
我正在使用带有 React Navigation 5 的 Native Base,native base 的复选框显示连字符 (-) 而不是勾号。内容也不显示文本。
/**
* @format
*/
import React from 'react';
import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
// import NavigationInitializer from './route/NavigationSetup';
import { name as appName } from './app.json';
import { LogBox } from 'react-native';
import { Root, Container, CheckBox, Content, Header, Text, Footer, Body } from 'native-base';
LogBox.ignoreAllLogs(); // remove unnecessary warnings
// This is useful when there's a noisy warning that cannot be fixed, like those in a third-party dependency.
// AppRegistry.registerComponent(appName, () => NavigationInitializer);
AppRegistry.registerComponent(appName, () => () =>
<Container>
<Header>
<Body>
<Text style={{ color: "#fff" }}>
Checkbox
</Text>
<CheckBox checked={true} />
</Body>
</Header>
<Content style={{ backgroundColor: "purple" }}>
<Text style={{ color: "black" }}>
This is Content Section
</Text>
</Content>
<Footer>
<Text style={{ color: "black" }}>
This is Footer Section
</Text>
</Footer>
</Container>
);
【问题讨论】:
标签: react-native react-navigation native-base