@chakra-ui/hooks
Version:
React hooks for Chakra components
15 lines (14 loc) • 390 B
TypeScript
type InitialState = boolean | (() => boolean);
/**
* React hook to manage boolean (on - off) states
*
* @param initialState the initial boolean state value
*
* @see Docs https://chakra-ui.com/docs/hooks/use-boolean
*/
export declare function useBoolean(initialState?: InitialState): readonly [boolean, {
on: () => void;
off: () => void;
toggle: () => void;
}];
export {};