"use client"; /* * Documentation: * Radio Group — https://app.subframe.com/f023064a5ca0/library?component=Radio+Group_c4b6300e-20b4-4f3e-8b9f-379a046674ca */ import React from "react"; import * as SubframeCore from "@subframe/core"; import * as SubframeUtils from "../../utils"; export interface OptionProps extends React.ComponentProps { label?: React.ReactNode; disabled?: boolean; className?: string; } const Option = React.forwardRef(function Option( { label, disabled = false, className, ...otherProps }: OptionProps, ref ) { return ( ); }); export interface RadioGroupRootProps extends React.ComponentProps { error?: boolean; horizontal?: boolean; label?: React.ReactNode; helpText?: React.ReactNode; children?: React.ReactNode; value?: string; onValueChange?: (value: string) => void; className?: string; } const RadioGroupRoot = React.forwardRef( function RadioGroupRoot( { error = false, horizontal = false, label, helpText, children, className, ...otherProps }: RadioGroupRootProps, ref ) { return (
{label ? ( {label} ) : null} {children ? (
{children}
) : null} {helpText ? ( {helpText} ) : null}
); } ); export const RadioGroup = Object.assign(RadioGroupRoot, { Option, });