From 88e47a6b5bc8aa7139794b427b1fffd4922f9bdb Mon Sep 17 00:00:00 2001 From: Ken Lim Date: Tue, 30 May 2017 13:29:07 +0800 Subject: [PATCH 1/2] Fix toast message not centered on rotation --- lib/ToastContainer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js index 631b88c..aff5fcf 100644 --- a/lib/ToastContainer.js +++ b/lib/ToastContainer.js @@ -200,7 +200,12 @@ class ToastContainer extends Component { return (this.state.visible || this._animating) ? Date: Wed, 29 Aug 2018 00:43:16 +0800 Subject: [PATCH 2/2] Fix PropTypes --- lib/Toast.js | 6 ++---- lib/ToastContainer.js | 8 +++----- package.json | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/Toast.js b/lib/Toast.js index 396cb93..0a93bd2 100644 --- a/lib/Toast.js +++ b/lib/Toast.js @@ -1,7 +1,5 @@ -import React, { - Component, - PropTypes -} from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { View } from 'react-native'; diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js index aff5fcf..1ca2785 100644 --- a/lib/ToastContainer.js +++ b/lib/ToastContainer.js @@ -1,7 +1,5 @@ -import React, { - Component, - PropTypes -} from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { StyleSheet, View, @@ -69,7 +67,7 @@ class ToastContainer extends Component { static propTypes = { ...View.propTypes, - containerStyle: View.propTypes.style, + containerStyle: PropTypes.style, duration: PropTypes.number, visible: PropTypes.bool, position: PropTypes.number, diff --git a/package.json b/package.json index 0b3bba9..943be6c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.2", + "version": "1.1.3", "name": "react-native-root-toast", "description": "react native toast like component, pure javascript solution", "repository": {