@mmcodemark/fuselage-hooks
Version:
React hooks for Fuselage, Rocket.Chat's design system and UI toolkit
10 lines • 436 B
TypeScript
import type { SetStateAction } from 'react';
/**
* Hook to create a toggleable boolean state.
*
* @param initialValue - the initial value or the initial state generator function
* @returns a state boolean value and a state toggler function
* @public
*/
export declare const useToggle: (initialValue?: boolean | (() => boolean)) => [boolean, (forcedValue?: SetStateAction<boolean>) => void];
//# sourceMappingURL=useToggle.d.ts.map