From 1b215f6cd92477c92b9e233035895fae4de9d0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Thu, 22 Jun 2023 14:31:19 +0200 Subject: [PATCH] fixed PressableWithFeedback props --- src/components/Pressable/PressableWithFeedback.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index 294968373455..7596c9bf8945 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -7,7 +7,7 @@ import GenericPressablePropTypes from './GenericPressable/PropTypes'; import OpacityView from '../OpacityView'; import variables from '../../styles/variables'; -const omittedProps = ['wrapperStyle', 'onHoverIn', 'onHoverOut', 'onPressIn', 'onPressOut']; +const omittedProps = ['wrapperStyle']; const PressableWithFeedbackPropTypes = { ...GenericPressablePropTypes.pressablePropTypes, @@ -38,7 +38,7 @@ const PressableWithFeedbackDefaultProps = { }; const PressableWithFeedback = forwardRef((props, ref) => { - const rest = _.omit(props, omittedProps); + const propsWithoutWrapperStyles = _.omit(props, omittedProps); const [disabled, setDisabled] = useState(props.disabled); const [isPressed, setIsPressed] = useState(false); const [isHovered, setIsHovered] = useState(false); @@ -55,6 +55,8 @@ const PressableWithFeedback = forwardRef((props, ref) => { > { setIsHovered(true); @@ -85,8 +87,6 @@ const PressableWithFeedback = forwardRef((props, ref) => { }); }); }} - // eslint-disable-next-line react/jsx-props-no-spreading - {...rest} > {(state) => (_.isFunction(props.children) ? props.children(state) : props.children)}