-
Notifications
You must be signed in to change notification settings - Fork 114
/
index.d.ts
33 lines (29 loc) · 955 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { RefObject } from "react";
export interface ReactGoogleAutocompleteProps {
onPlaceSelected?: (
places: google.maps.places.PlaceResult,
ref: RefObject<HTMLInputElement>,
autocompleteRef: RefObject<google.maps.places.Autocomplete>
) => void;
inputAutocompleteValue?: string;
options?: google.maps.places.AutocompleteOptions;
libraries?: string[];
apiKey?: string;
language?: string;
googleMapsScriptBaseUrl?: string;
}
export interface ReactGoogleAutocompleteInputProps
extends ReactGoogleAutocompleteProps,
React.DetailedHTMLProps<
React.HTMLAttributes<HTMLInputElement>,
HTMLInputElement
> {}
export default function ReactGoogleAutocomplete<T extends any>(
props: ReactGoogleAutocompleteInputProps & T
): JSX.Element;
export function usePlacesWidget<T = null>(
props: ReactGoogleAutocompleteProps
): {
ref: RefObject<T>;
autocompleteRef: RefObject<google.maps.places.Autocomplete>;
};