mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
* updating both transition group type definitions this patch makes the type definitions more consistent with naming and react usage conventions. additionally updating the version for react-addons-transition-group to 15.0 * adjusting naming of props to be better aligned with the react namespace. This will remove the React* prefix in favour of allowing react namespace access like React.* This will also address breaking compatibility with existing type definitions.
22 lines
863 B
TypeScript
22 lines
863 B
TypeScript
// Type definitions for React (react-addons-transition-group) 15.0
|
|
// Project: http://facebook.github.io/react/
|
|
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
|
|
import { ComponentClass, TransitionGroupProps } from 'react';
|
|
|
|
declare module 'react' {
|
|
export interface HTMLTransitionGroupProps<T> extends HTMLAttributes<T> {
|
|
component?: ReactType;
|
|
childFactory?: (child: ReactElement<any>) => ReactElement<any>;
|
|
}
|
|
|
|
export interface TransitionGroupProps extends HTMLTransitionGroupProps<ReactTransitionGroup> {
|
|
}
|
|
}
|
|
|
|
declare var ReactTransitionGroup: ReactTransitionGroup;
|
|
type ReactTransitionGroup = ComponentClass<TransitionGroupProps>;
|
|
export = ReactTransitionGroup;
|