DefinitelyTyped/types/react-collapse/index.d.ts
Forbes Lindesay 8f8f6c4392 [react] Use HTMLDialogElement for the dialog node (#23053)
* [react] Use HTMLDialogElement for the dialog node

* Actually add the `open` property

* This update requires typescript 2.6

* Update dependents of react to also require typescript 2.6
2018-02-12 12:55:52 +00: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.6
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> { }