@wordpress/components
Version:
UI components for WordPress.
31 lines • 1.4 kB
TypeScript
/**
* TextareaControls are TextControls that allow for multiple lines of text, and
* wrap overflow text onto a new line. They are a fixed height and scroll
* vertically when the cursor reaches the bottom of the field.
*
* ```jsx
* import { TextareaControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
*
* const MyTextareaControl = () => {
* const [ text, setText ] = useState( '' );
*
* return (
* <TextareaControl
* __nextHasNoMarginBottom
* label="Text"
* help="Enter some text"
* value={ text }
* onChange={ ( value ) => setText( value ) }
* />
* );
* };
* ```
*/
export declare const TextareaControl: import("react").ForwardRefExoticComponent<Pick<import("../base-control/types").BaseControlProps, "help" | "label" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & {
onChange: (value: string) => void;
value: string;
rows?: import("react").TextareaHTMLAttributes<HTMLTextAreaElement>["rows"];
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "help" | "label" | "children" | "onChange" | "value" | "rows" | "as" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLTextAreaElement>>;
export default TextareaControl;
//# sourceMappingURL=index.d.ts.map