【发布时间】:2021-03-10 23:13:53
【问题描述】:
我一直在尝试将样式应用于 react-native-progress-steps,但它在我的应用程序中不起作用。我将样式应用于View 和ProgressSteps 组件,但它没有显示在我的应用程序中。
<View style={{flex: 1}}>
<ProgressSteps style={styles.progressStepsStyle}>
<ProgressStep label="Information">
<View style={{ alignItems: 'center' }}>
<Text>This is the content within step 1!</Text>
</View>
</ProgressStep>
<ProgressStep label="Account">
<View style={{ alignItems: 'center' }}>
<Text>This is the content within step 2!</Text>
</View>
</ProgressStep>
<ProgressStep label="Completion">
<View style={{ alignItems: 'center' }}>
<Text>This is the content within step 3!</Text>
</View>
</ProgressStep>
<ProgressStep label="Verification">
<View style={{ alignItems: 'center' }}>
<Text>This is the content within step 4!</Text>
</View>
</ProgressStep>
</ProgressSteps>
</View>
</View>
这里是图书馆的链接:https://www.npmjs.com/package/react-native-progress-steps
【问题讨论】:
-
文档说你必须通过 nextBtnStyle、nextBtnTextStyle、previousBtnStyle 和 previousBtnTextStyle 属性来提供样式,而不是通常的样式属性。
-
非常感谢您的回复。实际上,我现在并不想在按钮上工作,我正在尝试在圆圈上工作。
标签: reactjs react-native styling react-native-progress-steps