UNPKG

@wordpress/components

Version:
28 lines 1.32 kB
/// <reference types="react" /> /** * TextControl components let users enter and edit text. * * ```jsx * import { TextControl } from '@wordpress/components'; * import { useState } from '@wordpress/element'; * * const MyTextControl = () => { * const [ className, setClassName ] = useState( '' ); * * return ( * <TextControl * label="Additional CSS Class" * value={ className } * onChange={ ( value ) => setClassName( value ) } * /> * ); * }; * ``` */ export declare const TextControl: import("react").ForwardRefExoticComponent<Pick<import("../base-control/types").BaseControlProps, "help" | "label" | "className" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & { onChange: (value: string) => void; value: string | number; type?: "number" | "text" | "search" | "email" | "tel" | "url" | "password" | undefined; } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "help" | "children" | "label" | "as" | "type" | "className" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>>; export default TextControl; //# sourceMappingURL=index.d.ts.map