UNPKG

@wix/design-system

Version:

@wix/design-system

41 lines 1.3 kB
import type { ReactNode, CSSProperties, TransitionEvent } from 'react'; type AriaBoolean = boolean | 'true' | 'false'; export interface GetCollapsePropsOutput { id: string; onTransitionEnd: (e: TransitionEvent) => void; style: CSSProperties; 'aria-hidden': AriaBoolean; } export interface GetCollapsePropsInput { [key: string]: unknown; style?: CSSProperties; onTransitionEnd?: (e: TransitionEvent) => void; refKey?: string; ref?: (node: ReactNode) => void | null | undefined; } export interface UseCollapseInput { isExpanded?: boolean; defaultExpanded?: boolean; collapsedHeight?: number; expandStyles?: {}; collapseStyles?: {}; easing?: string; duration?: number; onCollapseStart?: () => void; onCollapseEnd?: () => void; onExpandStart?: () => void; onExpandEnd?: () => void; hasDisabledAnimation?: boolean; } export interface UseCollapseOutput { getCollapseProps: (config?: GetCollapsePropsInput) => GetCollapsePropsOutput; isExpanded: boolean; setExpanded: React.Dispatch<React.SetStateAction<boolean>>; exitAnimationEnded: boolean; } export type UseControlledStateOutput = readonly [ boolean, React.Dispatch<React.SetStateAction<boolean>> ]; export {}; //# sourceMappingURL=types.d.ts.map