@appbuckets/react-ui
Version:
Just Another React UI Framework
15 lines (14 loc) • 543 B
TypeScript
import * as React from 'react';
export interface RadioContext {
/** Current radio value */
currentValue: string | number | undefined;
/** Change current radio value */
setValue: (
e: React.MouseEvent<HTMLLabelElement>,
newValue: string | number
) => void;
}
declare const useRadioContext: () => RadioContext | undefined,
RadioContextProvider: React.Provider<RadioContext | undefined>,
RadioContextConsumer: React.Consumer<RadioContext | undefined>;
export { useRadioContext, RadioContextProvider, RadioContextConsumer };