UNPKG

react-lightning-design-system

Version:

Salesforce Lightning Design System components built with React

39 lines (38 loc) 956 B
import React, { HTMLAttributes, Ref, ReactNode } from 'react'; import { FormElementProps } from './FormElement'; import { Bivariant } from './typeUtils'; /** * */ export type RadioValueType = string | number; /** * */ export declare const RadioGroupContext: React.Context<{ name?: string | undefined; error?: FormElementProps['error']; errorId?: string | undefined; onValueChange?: Bivariant<(value: RadioValueType) => void> | undefined; }>; /** * */ export type RadioGroupProps = { label?: string; required?: boolean; error?: boolean | string | { message: string; }; name?: string; cols?: number; tooltip?: ReactNode; tooltipIcon?: string; elementRef?: Ref<HTMLFieldSetElement>; onValueChange?: Bivariant<(value: RadioValueType) => void>; } & HTMLAttributes<HTMLFieldSetElement>; /** * */ export declare const RadioGroup: React.FC<RadioGroupProps> & { isFormElement: boolean; };