UNPKG

@appbuckets/react-ui

Version:
15 lines (14 loc) 543 B
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 };