Skip to content

Commit

Permalink
RC #121 - Removing default container style from GoogleMap component
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Apr 8, 2022
1 parent 2086281 commit acd0e01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/semantic-ui/GoogleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ const GoogleMap = (props: Props) => {
};

GoogleMap.defaultProps = {
containerStyle: {
height: '600px',
width: '600px'
},
defaultCenter: {
lat: 0,
lng: 0
Expand Down
11 changes: 11 additions & 0 deletions stories/components/semantic-ui/GoogleMap.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ export default {
decorators: [withA11y]
};

const containerStyle = {
height: '600px',
width: '600px'
};

export const Default = () => (
<GoogleMap
containerStyle={containerStyle}
googleMapsApiKey={process.env.REACT_APP_GOOGLE_MAPS_API_KEY || ''}
/>
);

export const DefaultCenter = () => (
<GoogleMap
containerStyle={containerStyle}
defaultCenter={{
lat: 42.3601,
lng: -71.0589
Expand All @@ -28,6 +35,7 @@ export const DefaultCenter = () => (

export const DefaultZoom = () => (
<GoogleMap
containerStyle={containerStyle}
defaultCenter={{
lat: 42.3601,
lng: -71.0589
Expand All @@ -45,6 +53,7 @@ export const WithMapMarker = () => {
return (
<>
<GoogleMap
containerStyle={containerStyle}
defaultCenter={DEFAULT_POSITION}
defaultPosition={DEFAULT_POSITION}
defaultZoom={DEFAULT_ZOOM}
Expand All @@ -70,6 +79,7 @@ export const EditableCooridnates = () => {
return (
<Form>
<GoogleMap
containerStyle={containerStyle}
googleMapsApiKey={process.env.REACT_APP_GOOGLE_MAPS_API_KEY || ''}
onDragEnd={(p) => setPosition(p)}
position={position}
Expand All @@ -94,6 +104,7 @@ export const EditableCoordinatesWithDefaults = () => {
return (
<Form>
<GoogleMap
containerStyle={containerStyle}
googleMapsApiKey={process.env.REACT_APP_GOOGLE_MAPS_API_KEY || ''}
onDragEnd={(p) => setPosition(p)}
position={position}
Expand Down

0 comments on commit acd0e01

Please sign in to comment.