shelving
Version:
Toolkit for using data in JavaScript.
17 lines (16 loc) • 839 B
TypeScript
import type { ReactElement } from "react";
import type { StringInputType } from "../../schema/StringSchema.js";
import { type ValueInputProps } from "./Input.js";
type TextFormatter = (str: string) => string;
export interface TextInputProps extends ValueInputProps<string> {
rows?: number | undefined;
multiline?: boolean;
input?: StringInputType;
min?: number | undefined;
max?: number | undefined;
/** Optional formatter — when provided the value is reformatted on blur and when initially displayed. */
formatter?: TextFormatter | undefined;
}
export declare function TextInput({ name, title, placeholder, // Placeholder must be defined or `:placeholder-shown` CSS rules won't show.
required, disabled, message, value, onValue, input, min, max, rows, formatter, }: TextInputProps): ReactElement;
export {};