@sanity/default-layout
Version:
The default layout components for Sanity
20 lines • 675 B
TypeScript
import type { SearchOptions, SearchTerms, WeightedHit } from '@sanity/base';
import type { Schema } from '@sanity/types';
import { SearchState } from '../types';
interface SearchRequest {
options?: SearchOptions;
terms: SearchTerms;
}
export declare function useSearch({ initialState, onComplete, onError, onStart, schema, }: {
initialState: SearchState;
onComplete?: (hits: WeightedHit[]) => void;
onError?: (error: Error) => void;
onStart?: () => void;
schema: Schema;
}): {
handleSearch: (request: SearchRequest) => void;
handleClearSearch: () => void;
searchState: SearchState;
};
export {};
//# sourceMappingURL=useSearch.d.ts.map