DefinitelyTyped/types/react-collapse/index.d.ts
Ferdy Budhidharma 6d2fc7181a feat(react-dependents): update to TS 2.8 (part 1 of 2) (#27743)
* feat(react-dependents): update to TS 2.8

* exclude react-dom

* fix version mismatches
2018-08-03 21:01:14 +01:00

29 lines
1.0 KiB
TypeScript

// Type definitions for react-collapse 4.0
// Project: https://github.com/nkbt/react-collapse
// Definitions by: Adam Binford <https://github.com/Kimahriman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
export interface CollapseProps extends React.HTMLProps<Collapse> {
isOpened: boolean;
children: React.ReactNode;
springConfig?: { [key: string]: number }; // react-motion doesn't export the config interface
forceInitialAnimation?: boolean;
hasNestedCollapse?: boolean;
fixedHeight?: number;
theme?: {
collapse: string
content: string
};
style?: React.CSSProperties;
onRender?: ({ current, from, to }: { current: number; from: number; to: number; }) => void;
onRest?: () => void;
onMeasure?: ({ width, height }: { width: number; height: number; }) => void;
}
export class Collapse extends React.PureComponent<CollapseProps> { }
export class UnmountClosed extends React.PureComponent<CollapseProps> { }