@appbuckets/react-ui
Version:
Just Another React UI Framework
18 lines (17 loc) • 525 B
TypeScript
import * as React from 'react';
import type { CheckboxChangeHandler } from '../Checkbox';
export declare type UseCheckboxValueReturn = [
boolean,
CheckboxChangeHandler,
React.Dispatch<React.SetStateAction<boolean>>
];
/**
* Use this hook to get automatically the checkbox value
* and the handler function to attach to checkbox.
* Additionally function to force change will be returned
*
* @param initialValue
*/
export declare function useCheckboxValue(
initialValue?: boolean | null
): UseCheckboxValueReturn;