Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 851ed43

Browse files
committed
Add type CSSTransitionEventHandler
1 parent 741cc45 commit 851ed43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/csstransition.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ import { TransitionObserver } from "./transitionobserver";
1919

2020
const TICK = 17;
2121

22+
export type CSSTransitionEventHandler = () => void;
23+
2224
export interface CSSTransitionProps
2325
extends HTMLAttributes<any> {
2426
active?: boolean;
2527
transitionAppear?: boolean;
2628
transitionDelay?: number;
27-
onTransitionComplete?: () => void;
29+
onTransitionComplete?: CSSTransitionEventHandler;
2830
component?: string | ComponentClass<any> | StatelessComponent<any>;
2931
children?: ReactNode;
3032
defaultStyle?: CSSProperties;

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
* of the MIT license. See the LICENSE file for details.
77
*/
88

9-
export { CSSTransition, CSSTransitionProps } from "./csstransition";
9+
export { CSSTransition, CSSTransitionProps, CSSTransitionEventHandler } from "./csstransition";
1010
export { CSSTransitionGroup, CSSTransitionGroupProps } from "./csstransitiongroup";
1111
export { transit } from "./transit";

0 commit comments

Comments
 (0)