diff --git a/AddressBar.js b/AddressBar.js index c141f3b..f697548 100644 --- a/AddressBar.js +++ b/AddressBar.js @@ -1,6 +1,7 @@ 'use strict'; import React from 'react'; +import PropTypes from 'prop-types'; import { TextInput, View @@ -73,10 +74,10 @@ class AddressBar extends BaseComponent { } AddressBar.propTypes = { - url: React.PropTypes.string, - onLoad: React.PropTypes.func, - onReload: React.PropTypes.func, - foregroundColor: React.PropTypes.string + url: PropTypes.string, + onLoad: PropTypes.func, + onReload: PropTypes.func, + foregroundColor: PropTypes.string }; AddressBar.defaultProps = { diff --git a/Button.js b/Button.js index abf8622..2960c1b 100644 --- a/Button.js +++ b/Button.js @@ -1,6 +1,7 @@ 'use strict'; -import React, {Component, PropTypes} from 'react'; +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; import { View, TouchableOpacity, diff --git a/StatusBar.js b/StatusBar.js index 93a0122..07bb508 100644 --- a/StatusBar.js +++ b/StatusBar.js @@ -1,6 +1,7 @@ 'use strict'; import React, {Component} from 'react'; +import PropTypes from 'prop-types'; import { TextInput, View, @@ -42,8 +43,8 @@ class StatusBar extends BaseComponent { } StatusBar.propTypes = { - status: React.PropTypes.string, - foregroundColor: React.PropTypes.string + status: PropTypes.string, + foregroundColor: PropTypes.string }; StatusBar.defaultProps = { diff --git a/Toolbar.js b/Toolbar.js index 776480e..b61eb21 100644 --- a/Toolbar.js +++ b/Toolbar.js @@ -1,6 +1,7 @@ 'use strict'; import React, {Component} from 'react'; +import PropTypes from 'prop-types'; import { View, Image @@ -85,14 +86,14 @@ class Toolbar extends BaseComponent { } Toolbar.propTypes = { - backButtonEnabled: React.PropTypes.bool, - forwardButtonEnabled: React.PropTypes.bool, - homeButtonEnabled: React.PropTypes.bool, - hideHomeButton: React.PropTypes.bool, - onBack: React.PropTypes.func, - onHome: React.PropTypes.func, - onForward: React.PropTypes.func, - foregroundColor: React.PropTypes.string + backButtonEnabled: PropTypes.bool, + forwardButtonEnabled: PropTypes.bool, + homeButtonEnabled: PropTypes.bool, + hideHomeButton: PropTypes.bool, + onBack: PropTypes.func, + onHome: PropTypes.func, + onForward: PropTypes.func, + foregroundColor: PropTypes.string }; Toolbar.defaultProps = { diff --git a/index.js b/index.js index d03ce67..09bd1d1 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ 'use strict'; -import React, {Component, PropTypes} from 'react'; +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; import { View, WebView diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b66d69d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "react-native-mobile-browser", + "version": "0.2.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "react-native-loading-spinner-overlay": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/react-native-loading-spinner-overlay/-/react-native-loading-spinner-overlay-0.5.2.tgz", + "integrity": "sha512-wIi8PMvD/KnzEgZN865Cm0VhyIba4Zrfwbyi9OPlBYi1+qQDq4MZtDCmKgH8ct7iXE7biTrcBzUxFAAPk9CvCw==" + } + } +} diff --git a/package.json b/package.json index 5d5b650..97c3a56 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,9 @@ }, "homepage": "https://github.com/radiegtya/react-native-webbrowser#readme", "dependencies": { - "react-native-loading-spinner-overlay": "0.4.1" + "react-native-loading-spinner-overlay": "0.5.2" + }, + "peerDependencies": { + "prop-types": "^15.6.1" } }