-
Notifications
You must be signed in to change notification settings - Fork 427
/
Copy pathlocation-map.d.ts
71 lines (71 loc) · 2.13 KB
/
location-map.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
declare module '@salesforce/design-system-react/components/location-map' {
import React from 'react';
type Props = {
/**
* CSS class names to be added with `slds-map` class. `array`, `object`, or `string` are accepted.
*/
className?: any[] | Record<string, any> | string;
/**
* CSS class names to be added to the container element. `array`, `object`, or `string` are accepted.
*/
classNameContainer?: any[] | Record<string, any> | string;
/**
* Accepts location object that will be shown if no location has been selected. Required
* * `id` : A unique identifier string for the location
* * `name` : Name of the location
* * `address` : Address of the location
*/
defaultLocation?: Partial<{
id: string /*.isRequired*/;
name: string /*.isRequired*/;
address: string /*.isRequired*/;
}> /*.isRequired*/;
/**
* HTML id for component.
*/
id?: string;
/**
* Labels
* * `title` - Title for the LocationMap component.
*/
labels?: Partial<{
title?: string;
}>;
/**
* Array of locations objects for the LocationMap component.**
* Each location object can contain:
* * `id` : A unique identifier string for the location
* * `name` : Name of the location
* * `address` : Address of the location
*/
locations?: Partial<{
id: string /*.isRequired*/;
name: string /*.isRequired*/;
address: string /*.isRequired*/;
}>[] /*.isRequired*/;
/**
* Callback function triggered when a location is selected
*/
onClickLocation?: (v: any) => any;
/**
* Accepts a Google Map API Key that will be used for showing the map
*/
googleAPIKey: string /*.isRequired*/;
/**
* Accepts location object that will be shown when selected
* * `id` : A unique identifier string for the location
* * `name` : Name of the location
* * `address` : Address of the location
*/
selection?: Partial<{
id: string /*.isRequired*/;
name: string /*.isRequired*/;
address: string /*.isRequired*/;
}>;
};
/**
* A location map component is used to find and show locations
*/
function Component(props: Props): JSX.Element;
export default Component;
}