Skip to content

Commit

Permalink
[@types/react-motion] Added didLeave. (DefinitelyTyped#22875)
Browse files Browse the repository at this point in the history
Added didLeave to TransitionMotion props.
  • Loading branch information
DimitarNestorov authored and weswigham committed Jan 18, 2018
1 parent 05c5ec5 commit 1b1867e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions types/react-motion/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Type definitions for react-motion
// Project: https://github.com/chenglou/react-motion
// Definitions by: Stepan Mikhaylyuk <https://github.com/stepancar>, Alexey Svetliakov <https://github.com/asvetliakov>
// Definitions by: Stepan Mikhaylyuk <https://github.com/stepancar>
// Alexey Svetliakov <https://github.com/asvetliakov>
// Dimitar Nestorov <https://github.com/dimitarnestorov>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// TypeScript Version: 2.3

Expand Down Expand Up @@ -113,15 +115,20 @@ interface TransitionProps {
styles: Array<TransitionStyle> | InterpolateFunction;
children?: (interpolatedStyles: Array<TransitionPlainStyle>) => ReactElement<any>;
/**
* Triggers when new elements appears
* Triggers when a new element will appear
* @param styleThatEntered
*/
willEnter?: (styleThatEntered: TransitionStyle) => PlainStyle;
/**
* Triggers when new element disappears
* Triggers when an element will disappear
* @param styleThatLeft
*/
willLeave?: (styleThatLeft: TransitionStyle) => Style | void;
/**
* Triggers when an element has disappeared
* @param styleThatLeft
*/
didLeave?: (styleThatLeft: TransitionStyle) => void;
}
export class TransitionMotion extends Component<TransitionProps> { }

Expand Down

0 comments on commit 1b1867e

Please sign in to comment.