Skip to content

Commit

Permalink
Update Fade.d.ts to fix incorrect onLeave typing
Browse files Browse the repository at this point in the history
## Motivation

When testing, we realized that our `onLeave` callback wasn't being called at all for the `Fade` component.

Looking at the types in react-transition-group, it looks like the actual correct prop is `onExit`.

## Fix

Update typings to `onExit`
  • Loading branch information
hsource committed Nov 2, 2023
1 parent aeaf180 commit 63fea08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/lib/Fade.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface FadeProps extends React.HTMLAttributes<HTMLElement> {
transitionAppear?: boolean;
transitionEnter?: boolean;
transitionLeave?: boolean;
onLeave?: () => void;
onExit?: () => void;
onEnter?: () => void;
innerRef?: React.Ref<HTMLElement>;
}
Expand Down

0 comments on commit 63fea08

Please sign in to comment.