UNPKG

extended-dynamic-forms

Version:

Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events

40 lines (38 loc) 1.48 kB
import { default as React } from 'react'; import { ChoiceWidgetProps, ChoiceWidgetState, ChoiceWidgetConfig, PresentationMode } from '../ChoiceWidget.types'; import { PresenterStrategy } from './PresenterStrategy'; /** * Radio presenter implementation using Ant Design Radio.Group component. * Provides a radio button UI with support for single selection only, * vertical and horizontal layouts, custom option rendering, and full accessibility. * * Radio groups are inherently single-select, making them ideal for mutually exclusive choices. * * @class RadioPresenter * @extends {PresenterStrategy} */ export declare class RadioPresenter extends PresenterStrategy { readonly presentationMode = PresentationMode.RADIO; /** * Render the radio widget using Ant Design Radio.Group. */ render(props: ChoiceWidgetProps, state: ChoiceWidgetState): React.ReactElement; /** * Handle selection change from Radio.Group component. * Radio groups only support single selection. */ handleSelectionChange(value: unknown): (string | number | boolean)[]; /** * Get default configuration for radio presentation. */ getDefaultProps(): Partial<ChoiceWidgetConfig>; /** * Validate radio-specific configuration. */ validateProps(config: ChoiceWidgetConfig): string[] | null; /** * Get the ARIA role for radio presentation. */ protected getAriaRole(): string; } export default RadioPresenter;