add missing beta annotations to radio button api

This commit is contained in:
Konstantin Schaper
2023-11-03 12:50:23 +01:00
parent f641c1ef08
commit b4136b9679
4 changed files with 16 additions and 0 deletions

View File

@@ -41,6 +41,10 @@ type Props<T extends Record<string, unknown>> = Omit<
readOnly?: boolean;
};
/**
* @beta
* @since 2.48.0
*/
function ControlledRadioGroupField<T extends Record<string, unknown>>({
name,
label,

View File

@@ -83,6 +83,10 @@ type Props = {
helpText?: string;
} & ComponentProps<typeof RadioGroup.Item>;
/**
* @beta
* @since 2.48.0
*/
const RadioButton = React.forwardRef<HTMLButtonElement, Props>(
({ id, testId, indicatorClassName, label, labelClassName, className, helpText, value, ...props }, ref) => {
const context = useRadioButtonContext();

View File

@@ -31,6 +31,10 @@ type Props = {
options?: { value: string; label?: string; helpText?: string }[];
} & ComponentProps<typeof RadixRadio.Root>;
/**
* @beta
* @since 2.48.0
*/
const RadioGroup = React.forwardRef<HTMLDivElement, Props>(({ options, children, className, ...props }, ref) => (
<RadixRadio.Root {...props} asChild>
<Control ref={ref} className={className}>

View File

@@ -35,6 +35,10 @@ type Props = {
helpText?: string;
} & ComponentProps<typeof RadioGroup>;
/**
* @beta
* @since 2.48.0
*/
const RadioGroupField = React.forwardRef<HTMLDivElement, Props>(
({ fieldClassName, labelClassName, label, helpText, children, ...props }, ref) => {
return (