diff --git a/Example/Switch.js b/Example/Switch.js index a2219da..d6f3e88 100644 --- a/Example/Switch.js +++ b/Example/Switch.js @@ -1,13 +1,12 @@ import React, { Component } from 'react' import PropTypes from "prop-types" import { - ViewPropTypes, - ColorPropType, StyleSheet, Animated, Easing, PanResponder, } from 'react-native' +import { ColorPropType } from 'deprecated-react-native-prop-types' const SCALE = 6 / 5 @@ -23,8 +22,8 @@ export default class extends Component { backgroundInactive: ColorPropType, onAsyncPress: PropTypes.func, onSyncPress: PropTypes.func, - style: ViewPropTypes.style, - circleStyle: ViewPropTypes.style + style: PropTypes.object, + circleStyle: PropTypes.object } static defaultProps = { diff --git a/lib/index.js b/lib/index.js index 7715b57..f2aead4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,13 +1,12 @@ import React, { Component } from 'react' import PropTypes from "prop-types" import { - ViewPropTypes, - ColorPropType, StyleSheet, Animated, Easing, PanResponder, } from 'react-native' +import { ColorPropType } from 'deprecated-react-native-prop-types' const SCALE = 6 / 5 @@ -23,8 +22,8 @@ export default class extends Component { backgroundInactive: ColorPropType, onAsyncPress: PropTypes.func, onSyncPress: PropTypes.func, - style: ViewPropTypes.style, - circleStyle: ViewPropTypes.style + style: PropTypes.object, + circleStyle: PropTypes.object } static defaultProps = { diff --git a/package.json b/package.json index b6ee2aa..9a2969c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "url": "git+https://github.com/poberwong/react-native-switch-pro.git" }, "dependencies": { - "prop-types": "^15.5.10" + "prop-types": "^15.5.10", + "deprecated-react-native-prop-types": "^2.3.0" }, "keywords": [ "switch",