UNPKG

@appbuckets/react-ui

Version:
21 lines (20 loc) 621 B
import * as React from 'react'; import type { CollapsableState, CollapseStateChangeHandler, } from '../Collapsable'; export declare type UseCollapsableStateReturn = [ undefined | CollapsableState, CollapseStateChangeHandler, React.Dispatch<React.SetStateAction<CollapsableState | undefined>> ]; /** * Use this hook to get automatically the open value * and the handler function to attach to collapsable element. * Additionally function to force change will be returned * * @param initialState */ export declare function useCollapsableState( initialState?: CollapsableState ): UseCollapsableStateReturn;