Skip to content

Commit a7d5a99

Browse files
authored
Fixes image resize naming (#2)
* Fixes image resize naming * Fixed stuff
1 parent 95b4bd2 commit a7d5a99

File tree

5 files changed

+3962
-13
lines changed

5 files changed

+3962
-13
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["react-native"]
3+
}

lib/IntroSlider.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ class IntroSlider extends React.Component<Props, State> {
9797
<Animated.View
9898
style={[
9999
styles.container,
100-
this._getAnimation(index, this.props.animationType) ||
101-
customAnimation
100+
this._getAnimation(index, this.props.animationType) || customAnimation
102101
]}>
103102
{child}
104103
</Animated.View>
@@ -205,9 +204,7 @@ class IntroSlider extends React.Component<Props, State> {
205204
<SkipButton
206205
onSkip={this.props.onSkip}
207206
skipTitleButton={
208-
isLast
209-
? this.props.skipLastTitleButton
210-
: this.props.skipTitleButton
207+
isLast ? this.props.skipLastTitleButton : this.props.skipTitleButton
211208
}
212209
/>
213210
) : (

lib/template/Slide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Slide extends React.PureComponent<Props> {
2121
<Image
2222
style={this.props.imageStyle}
2323
source={this.props.image}
24-
resizeMode={Image.resizeMode.contain}
24+
resizeMode="contain"
2525
/>
2626
<Text style={[styles.title, this.props.titleStyle]}>
2727
{this.props.title}

package.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
"bugs": {
1212
"url": "https://github.com/InterfaceKit/react-native-js-app-tutorial/issues"
1313
},
14-
"tags": ["react", "react-native", "react-component", "android", "ios"],
14+
"tags": [
15+
"react",
16+
"react-native",
17+
"react-component",
18+
"android",
19+
"ios"
20+
],
1521
"keywords": [
1622
"react",
1723
"react-native",
@@ -23,8 +29,7 @@
2329
"intro"
2430
],
2531
"scripts": {
26-
"prettier":
27-
"prettier --single-quote --print-width 81 --write index.js lib/Slider.js",
32+
"prettier": "prettier --single-quote --print-width 81 --write index.js lib/Slider.js",
2833
"start": "node node_modules/react-native/local-cli/cli.js start",
2934
"test": "jest"
3035
},
@@ -36,16 +41,17 @@
3641
"devDependencies": {
3742
"@types/eslint-plugin-prettier": "^2.2.0",
3843
"@types/prettier": "^1.7.0",
39-
"babel-jest": "21.0.2",
40-
"babel-preset-react-native": "3.0.2",
44+
"babel-jest": "^23.6.0",
45+
"babel-preset-react-native": "^4.0.1",
4146
"eslint": "^4.7.2",
4247
"eslint-config-prettier": "^2.6.0",
4348
"eslint-plugin-prettier": "^2.3.1",
4449
"flow": "^0.2.3",
45-
"jest": "21.0.2",
50+
"jest": "^23.6.0",
4651
"react-test-renderer": "16.0.0-alpha.12"
4752
},
4853
"jest": {
49-
"preset": "react-native"
54+
"preset": "react-native",
55+
"verbose": true
5056
}
5157
}

0 commit comments

Comments
 (0)