UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

18 lines 921 B
import * as React from 'react'; import { useFieldControlValidation } from "../field/control/useFieldControlValidation.js"; import type { BaseUIEventDetails } from "../utils/createBaseUIEventDetails.js"; export interface RadioGroupContext { disabled: boolean | undefined; readOnly: boolean | undefined; required: boolean | undefined; name: string | undefined; checkedValue: unknown; setCheckedValue: (value: unknown, eventDetails: BaseUIEventDetails<'none'>) => void; onValueChange: (value: unknown, eventDetails: BaseUIEventDetails<'none'>) => void; touched: boolean; setTouched: React.Dispatch<React.SetStateAction<boolean>>; fieldControlValidation?: ReturnType<typeof useFieldControlValidation>; registerControlRef: (element: HTMLElement | null) => void; } export declare const RadioGroupContext: React.Context<RadioGroupContext>; export declare function useRadioGroupContext(): RadioGroupContext;