Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 396a2df

Browse files
author
soliury
committed
add lineHeight to toast text
1 parent 7a63ccc commit 396a2df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/base/Toast.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React,{
1+
import React, {
22
Component,
33
PropTypes,
44
View,
@@ -8,7 +8,7 @@ import React,{
88
Animated
99
} from 'react-native';
1010

11-
const { height, width } = Dimensions.get('window');
11+
const {height, width} = Dimensions.get('window');
1212
const toastWidth = width * 0.7;
1313
const defaultText = 'Toast';
1414
const defaultTimeout = 2000;
@@ -42,7 +42,7 @@ class Toast extends Component {
4242

4343

4444
show(text = defaultText, timeout = defaultTimeout) {
45-
const { duration } = this.props;
45+
const {duration} = this.props;
4646
Animated.timing(this.state.fadeAnim, {
4747
toValue: 1,
4848
duration: duration
@@ -99,7 +99,8 @@ const styles = StyleSheet.create({
9999
flex: 1,
100100
color: 'white',
101101
fontSize: 16,
102-
textAlign: 'center'
102+
textAlign: 'center',
103+
lineHeight: 16 * 1.5
103104
}
104105
});
105106

0 commit comments

Comments
 (0)