UNPKG

741 BTypeScriptView Raw
1import React from 'react';
2import Transition from 'react-transition-group/Transition';
3import { TransitionCallbacks } from '@restart/ui/types';
4declare type Dimension = 'height' | 'width';
5export interface CollapseProps extends TransitionCallbacks, Pick<React.HTMLAttributes<HTMLElement>, 'role'> {
6 className?: string;
7 in?: boolean;
8 mountOnEnter?: boolean;
9 unmountOnExit?: boolean;
10 appear?: boolean;
11 timeout?: number;
12 dimension?: Dimension | (() => Dimension);
13 getDimensionValue?: (dimension: Dimension, element: HTMLElement) => number;
14 children: React.ReactElement;
15}
16declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & React.RefAttributes<Transition<any>>>;
17export default Collapse;