在NativeBase Docs中提到的每个代码示例中,都没有使用React StyleSheet。
我没有找到覆盖NativeBase样式的方法
如何将React StyleSheet包含到我的应用程序中?
答案 0 :(得分:0)
对于NativeBase,通常如果要自定义外观,则需要在主题级别而不是组件/窗口小部件级别执行此操作。
http://nativebase.io/docs/v0.5.2/customize
我认为这样可以保持用户界面一致。
查看您尝试覆盖样式的所有小部件的源代码:
https://github.com/GeekyAnts/NativeBase/blob/master/Components/Widgets/
在某些情况下,您可以修改某些方面,例如按钮
除this.props.style
this.props.textStyle
因此,您可以在定义组件时覆盖textStyle:
<Button textStyle={{...}}/>
https://github.com/GeekyAnts/NativeBase/blob/master/Components/Widgets/Button.js