From 36861d6ad4faacf95d7e2e279e9fb2aefbb002be Mon Sep 17 00:00:00 2001 From: Enrico Balsamo Date: Mon, 17 Jul 2023 10:35:14 +0200 Subject: [PATCH] Warning: Failed prop type: Invalid prop textMessage supplied to SnackbarComponent Solving issue #91 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ae1e313..30f4089 100644 --- a/index.js +++ b/index.js @@ -184,10 +184,10 @@ SnackbarComponent.propTypes = { left: PropTypes.number, right: PropTypes.number, top: PropTypes.number, - bottom: PropTypes.number, + bottom: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Animated.Value)]), visible: PropTypes.bool, actionText: PropTypes.string, - textMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + textMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), position: PropTypes.oneOf(['bottom', 'top']), // bottom (default), top // eslint-disable-next-line react/no-unused-prop-types autoHidingTime: PropTypes.number, // How long (in milliseconds) the snack bar will be hidden.