Skip to content

Commit f133c2f

Browse files
committed
Changes React.PropTypes to prop-types
1 parent 9b53e67 commit f133c2f

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

StatelessForm.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React, { Component, PropTypes } from 'react'
1+
import React, { Component } from 'react'
22
import { Platform, ScrollView, View } from 'react-native'
3+
import PropTypes from 'prop-types'
34

45
export default class StatelessForm extends Component {
56
componentDidMount() {
@@ -69,8 +70,8 @@ export default class StatelessForm extends Component {
6970

7071
StatelessForm.propTypes = {
7172
style: PropTypes.oneOfType([
72-
React.PropTypes.object,
73-
React.PropTypes.arrayOf(React.PropTypes.object),
73+
PropTypes.object,
74+
PropTypes.arrayOf(PropTypes.object),
7475
]),
7576
}
7677

components/InlineTextInput.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React, { Component, PropTypes } from 'react'
1+
import React, { Component } from 'react'
22
import { View, Text, TextInput, StyleSheet } from 'react-native'
3+
import PropTypes from 'prop-types'
34

45
export default class InlineTextInput extends Component {
56
componentDidMount() {
@@ -131,8 +132,8 @@ export default class InlineTextInput extends Component {
131132
}
132133

133134
const stylePropType = PropTypes.oneOfType([
134-
React.PropTypes.object,
135-
React.PropTypes.arrayOf(React.PropTypes.object),
135+
PropTypes.object,
136+
PropTypes.arrayOf(PropTypes.object),
136137
])
137138

138139
InlineTextInput.propTypes = {

components/LabeledTextInput.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React, { Component, PropTypes } from 'react'
1+
import React, { Component } from 'react'
22
import { View, Text, TextInput, StyleSheet } from 'react-native'
3+
import PropTypes from 'prop-types'
34

45
export default class LabeledTextInput extends Component {
56
componentDidMount() {
@@ -128,8 +129,8 @@ export default class LabeledTextInput extends Component {
128129
}
129130

130131
const stylePropType = PropTypes.oneOfType([
131-
React.PropTypes.object,
132-
React.PropTypes.arrayOf(React.PropTypes.object),
132+
PropTypes.object,
133+
PropTypes.arrayOf(PropTypes.object),
133134
])
134135

135136
LabeledTextInput.propTypes = {

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@
2626
"bugs": {
2727
"url": "https://github.com/danielweinmann/react-native-stateless-form/issues"
2828
},
29-
"homepage": "https://github.com/danielweinmann/react-native-stateless-form#readme"
29+
"homepage": "https://github.com/danielweinmann/react-native-stateless-form#readme",
30+
"dependencies": {
31+
"prop-types": "^15.6.0"
32+
}
3033
}

0 commit comments

Comments
 (0)