Skip to content

Commit 8d19c82

Browse files
committed
fix release bug
1 parent 6039628 commit 8d19c82

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

AppIntro.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,7 @@ export default class AppIntro extends Component {
342342
const root = children.props.children;
343343
let nodes = children;
344344
if (Array.isArray(root)) {
345-
nodes = root.map((node, i) => {
346-
let element = node;
347-
if (node.type.displayName === 'View') {
348-
element = this.renderChild(node, pageIndex, `${index}_${i}`);
349-
}
350-
return element;
351-
});
345+
nodes = root.map((node, i) => this.renderChild(node, pageIndex, `${index}_${i}`));
352346
}
353347
let animatedChild = children;
354348
if (level !== 0) {

Example/AppIntro.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default class AppIntro extends Component {
189189
}
190190

191191
renderPagination = (index, total, context) => {
192-
const { activeDotColor, dotColor, rightTextColor } = this.props;
192+
const { activeDotColor, dotColor, rightTextColor, leftTextColor } = this.props;
193193
const ActiveDot = (
194194
<View
195195
style={[this.styles.activeDotStyle, { backgroundColor: activeDotColor }]}
@@ -237,7 +237,7 @@ export default class AppIntro extends Component {
237237
style={this.styles.full}
238238
onPress={isSkipBtnShow ? () => this.props.onSkipBtnClick(index) : null}
239239
>
240-
<Text style={[this.styles.controllText, { color: rightTextColor }]}>{this.props.skipBtnLabel}</Text>
240+
<Text style={[this.styles.controllText, { color: leftTextColor }]}>{this.props.skipBtnLabel}</Text>
241241
</TouchableOpacity>
242242
</Animated.View>
243243
<View style={this.styles.dotContainer}>
@@ -284,7 +284,7 @@ export default class AppIntro extends Component {
284284
style={this.styles.full}
285285
onPress={isSkipBtnShow ? () => this.props.onSkipBtnClick(index) : null}
286286
>
287-
<Text style={[this.styles.controllText, { color: rightTextColor }]}>{this.props.skipBtnLabel}</Text>
287+
<Text style={[this.styles.controllText, { color: leftTextColor }]}>{this.props.skipBtnLabel}</Text>
288288
</TouchableOpacity>
289289
</View>
290290
<View style={this.styles.dotContainer}>
@@ -342,13 +342,7 @@ export default class AppIntro extends Component {
342342
const root = children.props.children;
343343
let nodes = children;
344344
if (Array.isArray(root)) {
345-
nodes = root.map((node, i) => {
346-
let element = node;
347-
if (node.type.displayName === 'View') {
348-
element = this.renderChild(node, pageIndex, `${index}_${i}`);
349-
}
350-
return element;
351-
});
345+
nodes = root.map((node, i) => this.renderChild(node, pageIndex, `${index}_${i}`));
352346
}
353347
let animatedChild = children;
354348
if (level !== 0) {

Example/index.ios.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import React, { Component } from 'react';
88
import { AppRegistry, StyleSheet, Text, View, Alert, Image } from 'react-native';
9-
import AppIntro from 'react-native-app-intro';
10-
// import AppIntro from './AppIntro';
9+
// import AppIntro from 'react-native-app-intro';
10+
import AppIntro from './AppIntro';
1111

1212
const styles = StyleSheet.create({
1313
slide: {

0 commit comments

Comments
 (0)