UNPKG

@payfit/unity-components

Version:

23 lines (22 loc) • 753 B
import { InputProps as CoreInputProps } from '../../../../core/components/input/Input.js'; export type InputProps = Omit<CoreInputProps, 'name' | 'value' | 'defaultValue' | 'isInvalid'>; /** * `Input` is a controlled input wired to the Form field context. * It is based on the Unity `Input` component. * * Example: * ```tsx * function ExampleField() { * const form = useUnityForm<{ name: string }>({ validators: {} }) * return ( * <form> * <form.AppField name="name"> * {() => <Input placeholder="Your name" />} * </form.AppField> * </form> * ) * } * ``` */ declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>; export { Input };