Skip to content

Commit 73d410b

Browse files
authored
Merge branch 'master' into master
2 parents 8ff792b + 8ad6eda commit 73d410b

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ textStyle | View.propTypes.style | true | {color:'white'} | 自定义text的
135135

136136

137137
方法 | 类型 | 可选 | 描述
138-
----------------- | -------- | -------- | -----------
138+
----------------- | -------- | -------- | ----------- | -----------
139139
show(text, duration) | function | false | 弹出提示框,单位是毫秒
140140
close() | function | true | 手动关闭提示框
141141

index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

2020
const 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

149149
Toast.defaultProps = {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-easy-toast",
3-
"version": "1.0.6",
3+
"version": "1.0.8",
44
"description": "A react native module to show toast like android, it works on iOS and Android.",
55
"main": "index.js",
66
"scripts": {
@@ -28,7 +28,8 @@
2828
"url": "https://github.com/crazycodeboy/react-native-easy-toast/issues"
2929
},
3030
"peerDependencies": {
31-
"react-native": ">=0.20.0"
31+
"react-native": ">=0.20.0",
32+
"prop-types": "^15.5.7"
3233
},
3334
"homepage": "https://github.com/crazycodeboy/react-native-easy-toast#readme",
3435
"dependencies": {

0 commit comments

Comments
 (0)