Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions lib/ToastContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ToastContainer extends Component {
top: 0,
bottom: this._keyboardHeight
};

const InnerView = this.props.view;
return (this.state.visible || this._animating) ? <View
style={[
styles.defaultStyle,
Expand Down Expand Up @@ -248,13 +248,19 @@ class ToastContainer extends Component {
pointerEvents="none"
ref={ele => this._root = ele}
>
{
props.view ?
<View>
<InnerView />
</View> :
<Text style={[
styles.textStyle,
props.textStyle,
props.textColor && {color: props.textColor}
]}>
styles.textStyle,
props.textStyle,
props.textColor && {color: props.textColor}
]}>
{this.props.children}
</Text>
}
</Animated.View>
</TouchableWithoutFeedback>
</View> : null;
Expand Down