This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update react-transition-group to v4 * Upgrade react-transition-group to v4
- Loading branch information
1 parent
7827cc1
commit 77ad8cb
Showing
6 changed files
with
158 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// flow-typed signature: e8479156f9001d8e633a0294717b4c83 | ||
// flow-typed version: c6154227d1/react-transition-group_v2.x.x/flow_>=v0.104.x | ||
|
||
// @flow | ||
|
||
declare module 'react-transition-group' { | ||
declare export type CSSTransitionClassNames = { | ||
appear?: string, | ||
appearActive?: string, | ||
enter?: string, | ||
enterActive?: string, | ||
enterDone?: string, | ||
exit?: string, | ||
exitActive?: string, | ||
exitDone?: string, | ||
... | ||
}; | ||
|
||
declare export type TransitionStatus = 'entering' | 'entered' | 'exiting' | 'exited'; | ||
|
||
declare export type EndHandler = (node: HTMLElement, done: () => void) => void; | ||
declare export type EnterHandler = (node: HTMLElement, isAppearing: boolean) => void; | ||
declare export type ExitHandler = (node: HTMLElement) => void; | ||
|
||
declare type TransitionActions = { | ||
appear?: boolean, | ||
enter?: boolean, | ||
exit?: boolean, | ||
... | ||
} | ||
|
||
declare type TransitionProps = TransitionActions & { | ||
mountOnEnter?: boolean, | ||
unmountOnExit?: boolean, | ||
onEnter?: EnterHandler, | ||
onEntering?: EnterHandler, | ||
onEntered?: EnterHandler, | ||
onExit?: ExitHandler, | ||
onExiting?: ExitHandler, | ||
onExited?: ExitHandler, | ||
... | ||
} & ({ | ||
timeout: number | { | ||
enter?: number, | ||
exit?: number, | ||
... | ||
}, | ||
addEndListener?: null, | ||
... | ||
} | { | ||
timeout?: number | { | ||
enter?: number, | ||
exit?: number, | ||
... | ||
}, | ||
addEndListener: EndHandler, | ||
... | ||
}) | ||
|
||
declare export class Transition extends React$Component<TransitionProps & { | ||
in?: boolean, | ||
// KA> | ||
children: ((status: TransitionStatus) => React$Element<any>) | React$Element<any>, | ||
// <KA | ||
... | ||
}> {} | ||
|
||
declare export class TransitionGroup extends React$Component<TransitionActions & { | ||
component?: React$ElementType | null, | ||
children?: React$Node, | ||
childFactory?: (child: React$Node) => React$Node, | ||
... | ||
}> {} | ||
|
||
declare export class ReplaceTransition extends React$Component<TransitionProps & { | ||
in: boolean, | ||
children: React$Node, | ||
... | ||
}> {} | ||
|
||
declare export class CSSTransition extends React$Component<TransitionProps & { | ||
in?: boolean, | ||
classNames: string | CSSTransitionClassNames, | ||
children?: ((status: TransitionStatus) => React$Node) | React$Node, | ||
... | ||
}> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters