UNPKG

@wordpress/components

Version:
34 lines 1.76 kB
/** * 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, "value" | "help"> & { __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">, "onChange" | "value" | "label" | "size" | "help" | "children" | "as" | "onDrag" | "onDragEnd" | "onDragStart" | "onClose" | "placeholder" | "__next40pxDefaultSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>>; export default SearchControl; //# sourceMappingURL=index.d.ts.map