Skip to content

Commit ce82b53

Browse files
committed
将被react-native移除的ViewPropTypes, ColorPropType更改补丁包
1 parent 29ea769 commit ce82b53

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

Example/Switch.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React, { Component } from 'react'
22
import PropTypes from "prop-types"
33
import {
4-
ViewPropTypes,
5-
ColorPropType,
64
StyleSheet,
75
Animated,
86
Easing,
97
PanResponder,
10-
} from 'react-native'
8+
} from 'react-native';
9+
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
1110

1211
const SCALE = 6 / 5
1312

lib/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React, { Component } from 'react'
22
import PropTypes from "prop-types"
33
import {
4-
ViewPropTypes,
5-
ColorPropType,
64
StyleSheet,
75
Animated,
86
Easing,
97
PanResponder,
10-
} from 'react-native'
8+
} from 'react-native';
9+
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
1110

1211
const SCALE = 6 / 5
1312

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"url": "git+https://github.com/poberwong/react-native-switch-pro.git"
1212
},
1313
"dependencies": {
14+
"deprecated-react-native-prop-types": "^5.0.0",
1415
"prop-types": "^15.5.10"
1516
},
1617
"keywords": [

0 commit comments

Comments
 (0)