@momo-kits/step 0.0.51-beta.1 → 0.0.51-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Step.horizontal.js +9 -10
- package/Step.vertical.js +4 -1
- package/package.json +1 -1
package/Step.horizontal.js
CHANGED
|
@@ -334,6 +334,7 @@ export default class HorizontalStep extends Component {
|
|
|
334
334
|
flexDirection: 'row',
|
|
335
335
|
flex: 1,
|
|
336
336
|
justifyContent: 'center',
|
|
337
|
+
width: lineWidth,
|
|
337
338
|
}}>
|
|
338
339
|
<View
|
|
339
340
|
style={{
|
|
@@ -387,18 +388,16 @@ export default class HorizontalStep extends Component {
|
|
|
387
388
|
};
|
|
388
389
|
|
|
389
390
|
render() {
|
|
390
|
-
const { style = {} } = this.props;
|
|
391
|
+
const { style = {}, scrollEnable = false } = this.props;
|
|
391
392
|
return (
|
|
392
|
-
<
|
|
393
|
-
<View
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
{this.renderCircle()}
|
|
399
|
-
</View>
|
|
393
|
+
<View style={[style]} onLayout={this.onLayout}>
|
|
394
|
+
<View
|
|
395
|
+
style={{
|
|
396
|
+
flexDirection: 'row',
|
|
397
|
+
}}>
|
|
398
|
+
{this.renderCircle()}
|
|
400
399
|
</View>
|
|
401
|
-
</
|
|
400
|
+
</View>
|
|
402
401
|
);
|
|
403
402
|
}
|
|
404
403
|
}
|
package/Step.vertical.js
CHANGED
|
@@ -359,8 +359,10 @@ export default class VerticalStep extends Component {
|
|
|
359
359
|
};
|
|
360
360
|
|
|
361
361
|
render() {
|
|
362
|
+
const { scrollEnabled = false } = this.props;
|
|
363
|
+
|
|
362
364
|
return (
|
|
363
|
-
<ScrollView>
|
|
365
|
+
<ScrollView scrollEnabled={scrollEnabled}>
|
|
364
366
|
<View onLayout={this.onLayout}>
|
|
365
367
|
<View style={[styles.circleColumn]}>
|
|
366
368
|
{this.renderCircle()}
|
|
@@ -391,6 +393,7 @@ VerticalStep.propTypes = {
|
|
|
391
393
|
titleStyle: PropTypes.object,
|
|
392
394
|
descriptionStyle: PropTypes.object,
|
|
393
395
|
dateStyle: PropTypes.object,
|
|
396
|
+
scrollEnabled: PropTypes.bool,
|
|
394
397
|
};
|
|
395
398
|
|
|
396
399
|
VerticalStep.defaultProps = {
|