UNPKG

@wordpress/components

Version:
29 lines 978 B
/// <reference types="react" /> import type { TextareaControlProps } from './types'; import type { WordPressComponentProps } from '../ui/context'; /** * 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 * label="Text" * help="Enter some text" * value={ text } * onChange={ ( value ) => setText( value ) } * /> * ); * }; * ``` */ export declare function TextareaControl(props: WordPressComponentProps<TextareaControlProps, 'textarea', false>): JSX.Element; export default TextareaControl; //# sourceMappingURL=index.d.ts.map