UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

59 lines (58 loc) 1.99 kB
import React from 'react'; import { StandardProps } from '../../util/component-types'; export interface ICollapsibleProps extends StandardProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> { /** Indicates that the component is in the "expanded" state when true and in * the "unexpanded" state when false. */ isExpanded: boolean; /** Show an animated transition for alternating values of \`isExpanded\`. */ isAnimated: boolean; /** If true, do not render children when fully collapsed. */ isMountControlled: boolean; /** If \isMountControlled\ is true, this value sets is the minimum height * the container needs to reach to not render any children. */ mountControlThreshold: number; /** Pass in a custom root element type. */ rootType: any; /** Pass in a callback to be called after ExpanderPanel has came to a rest. */ onRest?: () => void; } export interface ICollapsibleState { maxHeight: number; } declare class Collapsible extends React.Component<ICollapsibleProps, ICollapsibleState, {}> { static displayName: string; static peek: { description: string; categories: string[]; }; static propTypes: { children: any; className: any; isExpanded: any; isAnimated: any; isMountControlled: any; mountControlThreshold: any; onRest: any; rootType: any; }; private rootRef; isAnimated: boolean | undefined; delayTimer: number | null; _isMounted: boolean; static defaultProps: { isExpanded: boolean; isAnimated: boolean; isMountControlled: boolean; mountControlThreshold: number; rootType: string; }; state: { maxHeight: number; }; UNSAFE_componentWillMount(): void; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; render(): React.ReactNode; } export default Collapsible;