Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Commit

Permalink
#95 close button
Browse files Browse the repository at this point in the history
  • Loading branch information
rvennam987 committed Jan 17, 2017
1 parent 7d04d42 commit 5a28485
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/Dashboard/components/Map/PopUpCard/PopUpCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RetailerCard from './RetailerCard';
import StormCard from './StormCard';
import DCCard from './DCCard';


const showSelectedInfo = ({ type, data }) => { // eslint-disable-line
if (type === 'distributionCenter') {
return (
Expand Down Expand Up @@ -54,11 +55,12 @@ const formatTitle = type => {
return titles[type] || '';
};

const PopUpCard = ({ infoBox }) => (

const PopUpCard = ({ infoBox, selectMarker }) => (
<div className={`${classes.wrapper} ${classes[infoBox.type]}`}>
<div className={classes.title}>
<h4>{formatTitle(infoBox.type)} {infoBox.data.id}</h4>
<i className={`fa fa-times-circle-o ${classes.closeIcon}`} />
<i className={`fa fa-times-circle-o ${classes.closeIcon}`} onClick={() => selectMarker('hidden', {})} />
</div>
{showSelectedInfo(infoBox)}
</div>
Expand Down

0 comments on commit 5a28485

Please sign in to comment.