Skip to content

Commit

Permalink
updated gatsby example
Browse files Browse the repository at this point in the history
  • Loading branch information
JustFly1984 committed Apr 25, 2022
1 parent e9a9b71 commit 0be2046
Show file tree
Hide file tree
Showing 46 changed files with 361 additions and 653 deletions.
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions packages/react-google-maps-api-gatsby-example/.eslintignore

This file was deleted.

113 changes: 0 additions & 113 deletions packages/react-google-maps-api-gatsby-example/.eslintrc.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/react-google-maps-api-gatsby-example/.prettierrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { ComponentStory, ComponentMeta } from '@storybook/react'
import { BicyclingLayer as ExampleComponent} from '@react-google-maps/api'

import type { ComponentStory, ComponentMeta } from '@storybook/react'
import { BicyclingLayer as ExampleComponent } from '@react-google-maps/api'

import ExampleBicycling from './example-bicycling'
import { shapeExampleStyles } from '../components/styles'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react'
import { type CSSProperties, memo } from 'react'
import PropTypes from 'prop-types'
import { GoogleMap, BicyclingLayer } from '@react-google-maps/api'

Expand All @@ -8,25 +8,31 @@ const ExampleBicyclingPropTypes = {
}).isRequired,
}

const center = {
const center: google.maps.LatLngLiteral = {
lat: 0,
lng: -180,
}

const onClick = (...args) => {
function onClick(...args: any[]) {
console.log('onClick args: ', args)
}

const onBicyclingLayerLoad = (bicyclingLayer) => {
function onBicyclingLayerLoad (bicyclingLayer: google.maps.BicyclingLayer) {
// Do something with bicyclingLayer
console.log('bicyclingLayer: ', bicyclingLayer)
}

const onMapLoad = (map) => {
const onMapLoad = (map: google.maps.Map) => {
console.log('map: ', map)
}

function ExampleBicycling({ styles }) {
interface Props {
styles: {
container: CSSProperties | undefined
}
}

function ExampleBicycling({ styles }: Props) {
return (
<div className='map'>
<div className='map-container'>
Expand All @@ -47,4 +53,4 @@ function ExampleBicycling({ styles }) {

ExampleBicycling.propTypes = ExampleBicyclingPropTypes

export default React.memo(ExampleBicycling)
export default memo(ExampleBicycling)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { ComponentStory, ComponentMeta } from '@storybook/react'
import { Data as ExampleComponent} from '@react-google-maps/api'
import type { ComponentStory, ComponentMeta } from '@storybook/react'
import { Data as ExampleComponent } from '@react-google-maps/api'

import ExampleData from './example-data'
import { shapeExampleStyles } from '../components/styles'
Expand Down
Loading

0 comments on commit 0be2046

Please sign in to comment.