diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js
index a645d4d..aef4b05 100644
--- a/lib/ToastContainer.js
+++ b/lib/ToastContainer.js
@@ -227,6 +227,25 @@ class ToastContainer extends Component {
bottom: keyboardHeight
};
+ let toastChildContent
+ // if the passed content is string then use Text to render
+ // other wise use view
+ // Passed view will have its own style.
+ if(typeof this.props.children === 'string'){
+ toastChildContent =
+ {this.props.children}
+
+ }else{
+ // passed component can have their own style.
+ toastChildContent =
+ {this.props.children}
+
+ }
+
return (this.state.visible || this._animating) ? this._root = ele}
>
-
- {this.props.children}
-
+ {toastChildContent}
: null;