import { ReactNode } from 'react';
export interface TextInputProps {
id: string;
fieldId: string;
disabled?: boolean;
/** value of any error with this field */
error?: string | null;
readonly?: boolean;
/** prefix of this field */
prefix?: string | ReactNode;
/** suffix for this field */
suffix?: string | ReactNode;
classBlock?: string;
classModifiers?: string | string[];
className?: string;
noWhiteSpace?: boolean;
onChange?: (event: {
target: {
name: string;
value: string;
};
}) => void;
[key: string]: any;
}
export declare const DEFAULT_CLASS = "govuk-input";
/**
*
## When to use this component
Use the text input component when you need to let users enter text that’s no longer than a single line, such as their name or phone number.
## When not to use this component
Do not use the text input component if you need to let users enter longer answers that might spread over multiple lines.
In this case, you should use the textarea component.
## How it works
All text inputs must have visible labels; placeholder text is not an acceptable replacement for a label as it vanishes when users start typing.
Labels should be aligned above the text input they refer to. They should be short, direct and written in sentence case. Do not use colons at the end of labels.
If you’re asking just one question per page
as recommended, you can set the contents of the `