我正在使用https://github.com/skv-headless/react-native-scrollable-tab-view/blob/master/DefaultTabBar.js#L75中的react-native-scrollable-tab,我希望将'tabs'的'borderBottomColor'属性从提供的'#ccc'覆盖为'white'。
我怎样才能在React Native中这样做?
例如,我尝试了以下但没有工作:
<ScrollableTabView
style={{borderBottomColor: 'white'}}
>...</ScrollableTabView>
编辑**
答案 0 :(得分:0)
this.props.tabStyle使您能够覆盖styles.tabs
你需要做的是:
<ScrollableTabView
tabStyle={{borderBottomColor: 'white'}}
>...</ScrollableTabView>
击> <击> 撞击>
好的,所以我再次查看整个代码,似乎不可能只覆盖这种颜色。 DefaultTabBar从ScrollableTabView父级获取其覆盖样式,但ScrollableTabView不允许我们传递自己的样式。
您有两种选择: