Skip to content

Commit

Permalink
fix(useRTGTransitionProps): only add transition callbacks if user pas…
Browse files Browse the repository at this point in the history
…sed (#99)
  • Loading branch information
kyletsang authored Mar 18, 2024
1 parent 1bec0d5 commit c606485
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/useRTGTransitionProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ export default function useRTGTransitionProps({
return {
...props,
nodeRef,
onEnter: handleEnter,
onEntering: handleEntering,
onEntered: handleEntered,
onExit: handleExit,
onExiting: handleExiting,
onExited: handleExited,
addEndListener: handleAddEndListener,
...(onEnter && { onEnter: handleEnter }),
...(onEntering && { onEntering: handleEntering }),
...(onEntered && { onEntered: handleEntered }),
...(onExit && { onExit: handleExit }),
...(onExiting && { onExiting: handleExiting }),
...(onExited && { onExited: handleExited }),
...(addEndListener && { addEndListener: handleAddEndListener }),
children:
typeof children === 'function'
? (((status: TransitionStatus, innerProps: Record<string, unknown>) =>
Expand Down

0 comments on commit c606485

Please sign in to comment.