These are all the files from the Tabler react repos, made to work with laravel and webpack.

This commit is contained in:
James Cole
2019-01-04 17:03:16 +01:00
parent 961e7e92b3
commit 40028c8be7
94 changed files with 51417 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
// @flow
import * as React from "react";
import cn from "classnames";
import "./GoogleMap.css";
import {
withScriptjs,
withGoogleMap,
GoogleMap as ReactGoogleMap,
} from "react-google-maps";
const MapComponent: React.ElementType = withScriptjs(
withGoogleMap(props => (
<ReactGoogleMap
defaultZoom={8}
defaultCenter={{ lat: -34.397, lng: 150.644 }}
disableDefaultUI={true}
/>
))
);
type Props = {|
+blackAndWhite?: boolean,
|};
function GoogleMap({ blackAndWhite }: Props): React.Node {
const containerClasses = cn("GoogleMapContainer", { blackAndWhite });
return (
<MapComponent
googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places"
loadingElement={<div style={{ height: `100%` }} />}
containerElement={<div className={containerClasses} />}
mapElement={<div style={{ height: `100%` }} />}
/>
);
}
export default GoogleMap;