import React, { PropsWithChildren } from "react"; export interface InputEvent { value: string; } export interface ChangeEvent { value: string; } export interface TextInputProps { value?: string; color?: string; fontSize?: number; fontStyle?: number; fontFamily?: string; justification?: number; "kerning-factor"?: number; placeholder?: string; "placeholder-color"?: string; maxlength?: number; readonly?: boolean; "outline-color"?: string; "focused-outline-color"?: string; "highlighted-text-color"?: string; "highlight-color"?: string; "caret-color"?: string; onChange?: (e: ChangeEvent) => void; onInput?: (e: InputEvent) => void; } /** * TextInput component imitates web's ``. * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text * So it supports props like `placeholder`, `maxlength`, `onInput`, etc... * * TextInput also supports React's controlled components model: * https://reactjs.org/docs/uncontrolled-components.html. * If the user supplies a `value` prop, * then it never renders anything into that text editor other than * the string supplied by that `value` prop. */ export declare function TextInput(props: PropsWithChildren): React.DOMElement;