@wordpress/components
Version:
UI components for WordPress.
26 lines • 1.23 kB
TypeScript
import type { ForwardedRef } from 'react';
import type { InputControlProps } from './types';
export declare function UnforwardedInputControl({ __next36pxDefaultSize, __unstableStateReducer: stateReducer, __unstableInputWidth, className, disabled, help, hideLabelFromVision, id: idProp, isPressEnterToChange, label, labelPosition, onChange, onValidate, onKeyDown, prefix, size, style, suffix, value, ...props }: InputControlProps, ref: ForwardedRef<HTMLInputElement>): JSX.Element;
/**
* InputControl components let users enter and edit text. This is an experimental component
* intended to (in time) merge with or replace `TextControl`.
*
* ```jsx
* import { __experimentalInputControl as InputControl } from '@wordpress/components';
* import { useState } from '@wordpress/compose';
*
* const Example = () => {
* const [ value, setValue ] = useState( '' );
*
* return (
* <InputControl
* value={ value }
* onChange={ ( nextValue ) => setValue( nextValue ?? '' ) }
* />
* );
* };
* ```
*/
export declare const InputControl: import("react").ForwardRefExoticComponent<InputControlProps & import("react").RefAttributes<HTMLInputElement>>;
export default InputControl;
//# sourceMappingURL=index.d.ts.map