UNPKG

@payfit/unity-components

Version:

29 lines (28 loc) • 1.41 kB
import { SelectableCardRadioGroupProps as CoreSelectableCardRadioGroupProps } from '../../../../../core/components/selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.js'; export type SelectableCardRadioGroupProps = Omit<CoreSelectableCardRadioGroupProps, 'value' | 'defaultValue' | 'isInvalid'>; /** * `SelectableCardRadioGroup` is a controlled radio group wired to the TanStack Form field context. It is based on the Unity `SelectableCardRadioGroup` component. * * The SelectableCardRadioGroup component adapts to smaller screen sizes, with cards stacking vertically to maintain usability on mobile devices. * @example * ```tsx * import { useUnityForm } from '@payfit/unity-components' * function ExampleField() { * const form = useUnityForm({ 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 SelectableCardRadioGroup: import('react').ForwardRefExoticComponent<SelectableCardRadioGroupProps & import('react').RefAttributes<HTMLDivElement>>; export { SelectableCardRadioGroup };