@payfit/unity-components
Version:
28 lines (27 loc) • 1.17 kB
TypeScript
import { SelectableButtonGroupProps } from './SelectableButtonGroup.js';
export type TanstackSelectableButtonGroupProps = Omit<SelectableButtonGroupProps, 'value' | 'defaultValue' | 'isInvalid'>;
/**
* `TanstackSelectableButtonGroup` is a selectable button group wired to the TanStack Form field context.
* It is based on the Unity `SelectableButtonGroup` component.
*
* Example:
* ```tsx
* function ExampleField() {
* const form = useTanstackUnityForm<{ choice: string[] }>({ validators: {} })
* return (
* <form.AppForm>
* <form.AppField name="choice">
* {(field) => (
* <field.SelectableButtonGroup selectionMode="single">
* <SelectableButton value="option1">Option 1</SelectableButton>
* <SelectableButton value="option2">Option 2</SelectableButton>
* </field.SelectableButtonGroup>
* )}
* </form.AppField>
* </form.AppForm>
* )
* }
* ```
*/
declare const TanstackSelectableButtonGroup: import('react').ForwardRefExoticComponent<TanstackSelectableButtonGroupProps & import('react').RefAttributes<HTMLDivElement>>;
export { TanstackSelectableButtonGroup };