UNPKG

@vtex/admin-ui

Version:

> VTEX admin component library

19 lines (18 loc) 858 B
import type { GetCollapsePropsInput, GetCollapsePropsOutput, GetTogglePropsInput, GetTogglePropsOutput } from 'react-collapsed/dist/types'; export declare const useCollapsibleState: (props?: UseCollapsibleStateParams | undefined) => CollapsibleState; export interface UseCollapsibleStateParams { onCollapseStart?: () => void; onCollapseEnd?: () => void; onExpandStart?: () => void; onExpandEnd?: () => void; /** Weather the content is visible at first or not */ visible?: boolean; } export interface CollapsibleState { getToggleProps: (config?: GetTogglePropsInput) => GetTogglePropsOutput; getCollapseProps: (config?: GetCollapsePropsInput) => GetCollapsePropsOutput; /** Is true if content is currently visible */ visible: boolean; /** Toggle collapsible expansion */ toggle: () => void; }