Skip to content

Commit

Permalink
Fix warning for forwardedRef type
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenmemon committed Jun 21, 2023
1 parent 762a871 commit 4cfa953
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/withViewportOffsetTop.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export default function (WrappedComponent) {

WithViewportOffsetTop.displayName = `WithViewportOffsetTop(${getComponentDisplayName(WrappedComponent)})`;
WithViewportOffsetTop.propTypes = {
forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]),
// eslint-disable-next-line react/forbid-prop-types
forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.any})]),

};
WithViewportOffsetTop.defaultProps = {
forwardedRef: undefined,
Expand Down

0 comments on commit 4cfa953

Please sign in to comment.