react-google-autocomplete
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -14,6 +14,4 @@ import { HTMLProps } from "react"; | ||
export interface ReactGoogleAutocomplete< | ||
T = { current: null }, | ||
B = { current: null } | ||
> extends HTMLProps<HTMLInputElement> { | ||
export interface ReactGoogleAutocompleteProps<T = { current: null }> | ||
extends HTMLProps<HTMLInputElement> { | ||
onPlaceSelected?: ( | ||
@@ -26,4 +24,7 @@ places: Record<string, unknown>, | ||
apiKey?: string; | ||
ref?: T; | ||
autocompleteRef?: B; | ||
autocompleteRef?: T; | ||
} | ||
export default function ReactGoogleAutocomplete( | ||
props: ReactGoogleAutocompleteProps | ||
): JSX.Element; |
{ | ||
"name": "react-google-autocomplete", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "React component for google autocomplete.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -124,12 +124,8 @@ ![](/docs/example.gif) | ||
We are planning on adding full support for TS and Flow in the later releases. | ||
We are planning on rewritting the library with TS/Flow in the later releases but you can already use it with TypeScript. | ||
```ts | ||
import Autocomplete, { | ||
ReactGoogleAutocomplete, | ||
} from "react-google-autocomplete"; | ||
import Autocomplete from "react-google-autocomplete"; | ||
const AutocompleteTS: FC<ReactGoogleAutocomplete> = Autocomplete as FC<ReactGoogleAutocomplete>; | ||
<AutocompleteTS apiKey="123" />; | ||
<Autocomplete apiKey="123" />; | ||
``` | ||
@@ -136,0 +132,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222475
143