我用的是本能反应。我想用react-native-swiper的斯威珀。
从“react本机- Swiper”导入swiper;
如您所见,按钮的颜色被设置为blue作为默认的以及size。

我使用这个Swiper如下所示。
<Swiper
style={{
width,
height: 400,
}}
buttonWrapperStyle={{
paddingHorizontal: 20,
}}
horizontal
showsButtons={true}
showsPagination={true}
}
>
{file.map((onepic) => (
<File
resizeMode="cover"
style={{ width, height: 400 }}
source={{ uri: onepic }}
></File>
))}
</Swiper>即使我已经搜索了很多如何改变按钮的颜色和大小,但什么也没有发现。
请帮帮我。
发布于 2022-02-25 05:56:53
是的,你可以,有道具叫做buttonWrapperStyle,这只不过是一种风格。
您甚至可以使用nextButton或prevButton道具更改特定左/右按钮的样式。
nextButton={()=><Text style={styles.buttonText}>Next</Text>}在这里找到更多的细节,https://github.com/leecade/react-native-swiper#control-buttons
https://stackoverflow.com/questions/71261402
复制相似问题