UNPKG

@payfit/unity-components

Version:

29 lines (28 loc) 1.36 kB
import { SelectableCardRadioGroupProps } from './SelectableCardRadioGroup.js'; export type TanstackSelectableCardRadioGroupProps = Omit<SelectableCardRadioGroupProps, 'value' | 'defaultValue' | 'isInvalid'>; /** * `TanstackSelectableCardRadioGroup` is a controlled radio group wired to the TanStack Form field context. It is based on the Unity `SelectableCardRadioGroup` component. * * The TanstackSelectableCardRadioGroup component adapts to smaller screen sizes, with cards stacking vertically to maintain usability on mobile devices. * @example * ```tsx * import { useTanstackUnityForm } from '@payfit/unity-components' * function ExampleField() { * const form = useTanstackUnityForm({ validators: {} }) * return ( * <form.Form> * <form.AppField name="option"> * {(field) => ( * <field.SelectableCardRadioGroup> * <SelectableCardRadio value="option1" title="Option 1" /> * <SelectableCardRadio value="option2" title="Option 2" /> * </field.SelectableCardRadioGroup> * )} * </form.AppField> * </form.Form> * ) * } * ``` */ declare const TanstackSelectableCardRadioGroup: import('react').ForwardRefExoticComponent<TanstackSelectableCardRadioGroupProps & import('react').RefAttributes<HTMLDivElement>>; export { TanstackSelectableCardRadioGroup };