diff --git a/package.json b/package.json index ed4a579..a86e4fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "galio-framework", "main": "src/index.js", - "version": "0.7.0", + "version": "0.7.1", "files": [ "src/" ], diff --git a/src/Block.js b/src/Block.js index 19eaaf6..da038d4 100644 --- a/src/Block.js +++ b/src/Block.js @@ -93,7 +93,7 @@ Block.propTypes = { card: PropTypes.bool, left: PropTypes.bool, shadow: PropTypes.bool, - space: PropTypes.string, + space: PropTypes.oneOf(['between', 'around', 'evenly' ]), fluid: PropTypes.bool, height: PropTypes.number, width: PropTypes.number, diff --git a/src/Toast.js b/src/Toast.js index fc3b557..459d911 100644 --- a/src/Toast.js +++ b/src/Toast.js @@ -21,9 +21,10 @@ class Toast extends Component { ]), round: PropTypes.bool, style: ViewPropTypes.style, - textStyle: ViewPropTypes.style, + textStyle: PropTypes.object, styles: PropTypes.any, theme: PropTypes.any, + useNativeDriver: PropTypes.bool }; static defaultProps = { @@ -37,6 +38,7 @@ class Toast extends Component { textStyle: null, styles: {}, theme: GalioTheme, + useNativeDriver: true }; state = { @@ -49,7 +51,7 @@ class Toast extends Component { visibilityTimeout; componentDidUpdate(prevProps) { - const { isShow, fadeInDuration, fadeOutDuration } = this.props; + const { isShow, fadeInDuration, fadeOutDuration, useNativeDriver } = this.props; const { isShow: prevIsShow } = prevProps; const { fadeAnim } = this.state; @@ -59,6 +61,7 @@ class Toast extends Component { this.animation = Animated.timing(fadeAnim, { toValue: 1, duration: fadeInDuration, + useNativeDriver, }).start(); } @@ -66,6 +69,7 @@ class Toast extends Component { this.animation = Animated.timing(fadeAnim, { toValue: 0, duration: fadeOutDuration, + useNativeDriver, }).start(); this.visibilityTimeout = setTimeout(() => {