@wordpress/components
Version:
UI components for WordPress.
34 lines • 1.76 kB
TypeScript
/**
* SearchControl components let users display a search control.
*
* ```jsx
* import { SearchControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
*
* function MySearchControl( { className, setState } ) {
* const [ searchInput, setSearchInput ] = useState( '' );
*
* return (
* <SearchControl
* value={ searchInput }
* onChange={ setSearchInput }
* />
* );
* }
* ```
*/
export declare const SearchControl: import("react").ForwardRefExoticComponent<Pick<import("../input-control/types").InputControlProps, "help" | "value"> & {
__next40pxDefaultSize?: import("../input-control/types").InputControlProps['__next40pxDefaultSize'];
__nextHasNoMarginBottom?: boolean;
hideLabelFromVision?: import("../input-control/types").InputControlProps['hideLabelFromVision'];
label?: string;
onChange: (value: string) => void;
onClose?: () => void;
onDrag?: import("../input-control/types").InputControlProps['onDrag'];
onDragStart?: import("../input-control/types").InputControlProps['onDragStart'];
onDragEnd?: import("../input-control/types").InputControlProps['onDragEnd'];
placeholder?: import("../input-control/types").InputControlProps['placeholder'];
size?: 'default' | 'compact';
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom" | "as" | "children" | "help" | "hideLabelFromVision" | "label" | "onChange" | "onClose" | "onDrag" | "onDragEnd" | "onDragStart" | "placeholder" | "size" | "value"> & import("react").RefAttributes<HTMLInputElement>>;
export default SearchControl;
//# sourceMappingURL=index.d.ts.map