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