UNPKG

@appbuckets/react-ui

Version:
18 lines (17 loc) 533 B
import * as React from 'react'; import type { RadioChangeHandler } from '../Radio'; export declare type UseRadioValueReturn<V> = [ V | undefined, RadioChangeHandler, React.Dispatch<React.SetStateAction<V | undefined>> ]; /** * Use this hook to get automatically the input value * and the handler function to attach to input. * Additionally function to force change will be returned * * @param initialValue */ export declare function useRadioValue<V extends string | number>( initialValue?: V ): UseRadioValueReturn<V>;