File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 77 */
88
99import React , { Component } from 'react' ;
10+ import PropTypes from 'prop-types' ;
1011import {
1112 StyleSheet ,
1213 View ,
1314 Animated ,
1415 Dimensions ,
1516 Text ,
17+ ViewPropTypes as RNViewPropTypes ,
1618} from 'react-native'
1719
20+ const ViewPropTypes = RNViewPropTypes || View . propTypes ;
21+
1822export const DURATION = {
1923 LENGTH_LONG : 2000 ,
2024 LENGTH_SHORT : 500 ,
@@ -129,17 +133,17 @@ const styles = StyleSheet.create({
129133} ) ;
130134
131135Toast . propTypes = {
132- style : View . propTypes . style ,
133- position : React . PropTypes . oneOf ( [
136+ style : ViewPropTypes . style ,
137+ position : PropTypes . oneOf ( [
134138 'top' ,
135139 'center' ,
136140 'bottom' ,
137141 ] ) ,
138142 textStyle : Text . propTypes . style ,
139- positionValue : React . PropTypes . number ,
140- fadeInDuration : React . PropTypes . number ,
141- fadeOutDuration : React . PropTypes . number ,
142- opacity : React . PropTypes . number
143+ positionValue : PropTypes . number ,
144+ fadeInDuration : PropTypes . number ,
145+ fadeOutDuration : PropTypes . number ,
146+ opacity : PropTypes . number
143147}
144148
145149Toast . defaultProps = {
Original file line number Diff line number Diff line change 3030 "peerDependencies" : {
3131 "react-native" : " >=0.20.0"
3232 },
33- "homepage" : " https://github.com/crazycodeboy/react-native-easy-toast#readme"
33+ "homepage" : " https://github.com/crazycodeboy/react-native-easy-toast#readme" ,
34+ "dependencies" : {
35+ "prop-types" : " ^15.5.10"
36+ }
3437}
You can’t perform that action at this time.
0 commit comments