标签: react-native styles stylesheet
它基本上是来自react-native-elements的搜索栏组件,其中容器背景颜色为白色,占位符字段具有半径边框。
不确定react-native-element是否允许为占位符提供样式。 任何其他方式我可以使用样式和react-native-elements搜索栏组件来获得此结果?
答案 0 :(得分:3)
您需要修改input和container样式
input
container
<SearchBar inputStyle={{backgroundColor: 'white'}} containerStyle={{backgroundColor: 'white', borderWidth: 1, borderRadius: 5}} placeholderTextColor={'#g5g5g5'} placeholder={'Pritish Vaidya'} />
检查docs以获取更多道具,然后您可以提供自己的Icon
Icon