UNPKG

@wordpress/components

Version:
29 lines 1.31 kB
/// <reference types="react" /> /** * 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("../base-control/types").BaseControlProps, "help" | "label" | "__nextHasNoMarginBottom"> & { hideLabelFromVision?: boolean | undefined; onChange: (value: string) => void; onClose?: (() => void) | undefined; placeholder?: string | undefined; value?: string | undefined; } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "help" | "children" | "label" | "as" | "placeholder" | "onClose" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>>; export default SearchControl; //# sourceMappingURL=index.d.ts.map