22 * react-native-easy-toast
33 * https://github.com/crazycodeboy/react-native-easy-toast
44 * Email:crazycodeboy@gmail.com
5- * Blog:http://www.devio.org/
5+ * Blog:http://jiapenghui.com
66 * @flow
77 */
88
@@ -18,9 +18,9 @@ import {
1818} from 'react-native'
1919
2020const ViewPropTypes = RNViewPropTypes || View . propTypes ;
21-
22- export const DURATION = {
23- LENGTH_LONG : 2000 ,
21+ import { PropTypes } from 'prop-types' ;
22+ export const DURATION = {
23+ LENGTH_LONG : 2000 ,
2424 LENGTH_SHORT : 500 ,
2525 FOREVER : 0 ,
2626} ;
@@ -99,15 +99,15 @@ export default class Toast extends Component {
9999 pos = height - this . props . positionValue ;
100100 break ;
101101 }
102-
102+
103103 const view = this . state . isShow ?
104104 < View
105105 style = { [ styles . container , { top : pos } ] }
106106 pointerEvents = "none"
107- >
107+ >
108108 < Animated . View
109109 style = { [ styles . content , { opacity : this . state . opacityValue } , this . props . style ] }
110- >
110+ >
111111 < Text style = { this . props . textStyle } > { this . state . text } </ Text >
112112 </ Animated . View >
113113 </ View > : null ;
@@ -140,10 +140,10 @@ Toast.propTypes = {
140140 'bottom' ,
141141 ] ) ,
142142 textStyle : Text . propTypes . style ,
143- positionValue : PropTypes . number ,
144- fadeInDuration : PropTypes . number ,
145- fadeOutDuration : PropTypes . number ,
146- opacity : PropTypes . number
143+ positionValue :PropTypes . number ,
144+ fadeInDuration :PropTypes . number ,
145+ fadeOutDuration :PropTypes . number ,
146+ opacity :PropTypes . number
147147}
148148
149149Toast . defaultProps = {
0 commit comments