UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

35 lines (34 loc) 1.09 kB
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'; import { ComponentProps } from 'react'; /** * State provider for the radio. Radio cannot be rendered without a parent. * * Use {@link RadioGroup} for a complete radio selection list component. */ export declare const RadioRoot: import('react').ForwardRefExoticComponent<RadioGroupPrimitive.RadioGroupProps & import('react').RefAttributes<HTMLDivElement>>; /** * Radio component, it implements just the Radio control input. * It must be wrapped in a RadioGroup.Root. * * Use {@link RadioGroup} for a complete radio selection list component. * * @example * ```tsx * <RadioRoot * onValueChange={(value) => console.log(value)} * defaultValue="unread" * > * <Radio value="unread" /> * </RadioRoot> * ``` * * * @example * ```tsx * // typically wrapped with SideLabel for proper labeling * <SideLabel label="Unread"> * <Radio value="unread" /> * </SideLabel> * ``` */ export declare const Radio: ({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) => import("react").JSX.Element;