mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add React.ClassSet interface and properly extend CSSTransitionGroup from TransitionGroup; +tests in react-addons-tests
This commit is contained in:
Vendored
+15
-7
@@ -647,21 +647,29 @@ declare module React {
|
||||
}
|
||||
|
||||
//
|
||||
// React.addons (Transitions)
|
||||
// React.addons
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface CSSTransitionGroupProps {
|
||||
transitionName: string;
|
||||
transitionAppear?: boolean;
|
||||
transitionEnter?: boolean;
|
||||
transitionLeave?: boolean;
|
||||
interface ClassSet {
|
||||
[key: string]: boolean;
|
||||
}
|
||||
|
||||
//
|
||||
// React.addons (Transitions)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface TransitionGroupProps {
|
||||
component?: any; // ReactType
|
||||
childFactory?: (child: ReactElement<any>) => ReactElement<any>;
|
||||
}
|
||||
|
||||
interface CSSTransitionGroupProps extends TransitionGroupProps {
|
||||
transitionName: string;
|
||||
transitionAppear?: boolean;
|
||||
transitionEnter?: boolean;
|
||||
transitionLeave?: boolean;
|
||||
}
|
||||
|
||||
interface CSSTransitionGroup extends ComponentClass<CSSTransitionGroupProps> {}
|
||||
interface TransitionGroup extends ComponentClass<TransitionGroupProps> {}
|
||||
|
||||
@@ -874,7 +882,7 @@ declare module React {
|
||||
batchedUpdates<A>(callback: (a: A) => any, a: A): void;
|
||||
batchedUpdates(callback: () => any): void;
|
||||
|
||||
classSet(cx: { [key: string]: boolean }): string;
|
||||
classSet(cx: ClassSet): string;
|
||||
cloneWithProps<P>(element: ReactElement<P>, props: P): ReactElement<P>;
|
||||
|
||||
update(value: any[], spec: UpdateArraySpec): any[];
|
||||
|
||||
Reference in New Issue
Block a user