UNPKG

@wordpress/components

Version:
28 lines 1.32 kB
/** * 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, "__nextHasNoMarginBottom" | "className" | "help" | "hideLabelFromVision" | "label"> & { onChange: (value: string) => void; value: string | number; type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'search' | 'url'; __next40pxDefaultSize?: boolean; } & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "as" | "children" | "className" | "help" | "hideLabelFromVision" | "label" | "onChange" | "type" | "value"> & import("react").RefAttributes<HTMLInputElement>>; export default TextControl; //# sourceMappingURL=index.d.ts.map