@hhgtech/hhg-components
Version:
Hello Health Group common components
29 lines (28 loc) • 1.23 kB
TypeScript
import React, { Dispatch } from 'react';
import type { DebouncedFunc } from 'lodash';
import { ReducerState, Action } from "../reducer";
import { TypeSearch, SearchClick, GATrackingCode } from "../types";
type Props = {
state: ReducerState;
type: TypeSearch;
initalSearchValue?: string;
isMobile: boolean;
isLoading: boolean;
hideSpecialtySelection?: boolean;
clientSlug?: string;
typeInformation: {
[key in TypeSearch]: {
name: string;
icon: React.ReactNode;
slug: string;
};
};
trackingAttributes?: GATrackingCode;
dispatch: Dispatch<Action>;
onSearch?: (info: SearchClick) => void;
onEnterSearch?: () => void;
focusSearchInput?: () => void;
debouncedFetchSearchResults: DebouncedFunc<(keyword: string, state: ReducerState, searchType: TypeSearch, clientSlug?: string) => Promise<void>>;
};
declare const SearchInputs: ({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection, clientSlug, focusSearchInput, onSearch, onEnterSearch, dispatch, }: Props) => React.JSX.Element;
export default SearchInputs;