• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

textkernel / oneui / 11329981660

14 Oct 2024 02:50PM CUT coverage: 89.961%. Remained the same
11329981660

Pull #1287

github

web-flow
Merge 19b867e16 into cc14555ea
Pull Request #1287: fix(MultiSelectItem): use correct background color for the group-title variant

1439 of 1797 branches covered (80.08%)

Branch coverage included in aggregate %.

3346 of 3522 relevant lines covered (95.0%)

67.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/components/Map/MapWithGoogleLoader/MapWithGoogleLoader.tsx
1
import * as React from 'react';
5✔
2
import { GoogleMap, LoadScriptNext, LoadScriptNextProps } from '@react-google-maps/api';
5✔
3
import { LoadingSpinner } from '../../LoadingSpinner';
5✔
4
import { Map, MapProps } from '../Map';
5✔
5
/**
6
 * ## Note about props
7
 * `MapWithGoogleLoader` is a wrapper around the `Map` component, and it makes sure the Google API is loaded on the page.
8
 *
9
 * If you don't use `Map` directly.
10
 * `MapWithGoogleLoader` __will pass props__ that are not needed for loading the API __to `Map`__,
11
 * so you can provide them all together.
12
 */
13

14
export interface Props extends MapProps {
15
    /** Google API key */
16
    apiKey: string;
17
    /** Tha language code to be used for the map (e.g en). By default the users browser language will be used
18
     * For available values see: https://developers.google.com/maps/faq#languagesupport
19
     */
20
    language?: string;
21
    /** Regional setting for the map. By default Google uses US.
22
     * For details see: https://developers.google.com/maps/documentation/javascript/localization#Region
23
     */
24
    region?: string;
25
    /** other props to pass to the google loader. For details see: https://react-google-maps-api-docs.netlify.com/#loadscriptnext */
26
    additionalGoogleProps?: Omit<LoadScriptNextProps, 'googleMapsApiKey'>;
27
}
28
export const MapWithGoogleLoader = React.forwardRef<GoogleMap, Props>(
5✔
29
    ({ apiKey, language, region, additionalGoogleProps = {}, ...rest }, ref) => (
×
30
        <LoadScriptNext
31
            googleMapsApiKey={apiKey}
32
            language={language}
33
            region={region}
34
            loadingElement={<LoadingSpinner centerIn="parent" />}
35
            {...additionalGoogleProps}
36
        >
37
            <Map ref={ref} {...rest} />
38
        </LoadScriptNext>
39
    )
40
);
41

42
MapWithGoogleLoader.displayName = 'MapWithGoogleLoader';
5✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc