react-native - 使用 react-native-progress-steps 更改进度步骤指示器的边框宽度
问题描述
我试图在使用 react-native-progress-steps (https://github.com/colbymillerdev/react-native-progress-steps)时设置进度步骤指示器的边框宽度 - 而不是连接线的宽度而是每一步圆圈的边界。文档中没有提到这些样式。任何解决方法?
解决方案
您可以覆盖默认的边框宽度和 StepsIcon 的任何其他样式,方法是转到
> node_modules\react-native-progress-steps\src\ProgressSteps\StepIcon.js
在第 153 行,用您选择的值覆盖borderWidth。
例子:
//StepIcon.js
return (
<View style={{ flexDirection: 'column', alignItems: 'center' }}>
{/* below you can see that I have appended the border width of 10*/}
<View style={{ ...styles.circleStyle, ...{borderWidth: this.props.isActiveStep?10:0} }}>
<Text style={styles.circleText}>
{this.props.isCompletedStep ? (
<Text style={{ color: this.props.completedCheckColor }}>✓</Text>
) : (
<Text style={styles.stepNum}>{this.props.stepNum}</Text>
)}
</Text>
//....
)
推荐阅读
- regex - VBA - 正则表达式
- spring - spring mvc:当控制器的返回类型为CompletableFuture时如何设置请求超时?
- r - 为什么 rbind 在 R 的函数循环中不起作用
- google-cloud-platform - 如何为非工程师成员添加 GCS 存储桶的读取权限?
- java - 当 ManyToOne 与 OneToMany 直通关系表一起使用时,持续不工作
- matlab - 如何在不使用 for 循环的情况下计算图像中像素强度的出现次数?
- jenkins - Jenkins Permission Denied on shell 执行
- ios - 显示名称/描述 - 应用内购买已退回
- sql-server - 根据数据库中保存的经度和纬度显示附近的地方。angular6 + sql服务器
- php - 随机选择记录,与先前选择的记录不同