-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBC22-1885: resolved conflicts and made icons consistent
DBC22-1885: resolved conflicts and made icons consistent
- Loading branch information
1 parent
47adae1
commit 91edc08
Showing
6 changed files
with
269 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// React | ||
import React from 'react'; | ||
import restStopIconActive from '../images/mapIcons/restarea-open-active.png'; | ||
import restStopIconActiveClosed from '../images/mapIcons/restarea-closed-active.png'; | ||
import restStopIconActiveTruck from '../images/mapIcons/restarea-truck-open-active.png'; | ||
import restStopIconActiveTruckClosed from '../images/mapIcons/restarea-truck-closed-active.png'; | ||
import { isRestStopClosed } from './data/restStops'; | ||
|
||
export default function RestStopTypeIcon(props) { | ||
const { reststop } = props; | ||
const isRestStopOpenYearAround = reststop.properties.OPEN_YEAR_ROUND === "Yes"? true: false; | ||
const isLargeVehiclesAccommodated = reststop.properties.ACCOM_COMMERCIAL_TRUCKS === "Yes"? true: false; | ||
|
||
if (isRestStopOpenYearAround ){ | ||
if(isLargeVehiclesAccommodated){ | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActiveTruck } /> | ||
} else { | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActive } /> | ||
} | ||
} else { | ||
const isClosed = isRestStopClosed(reststop.properties); | ||
|
||
if(isClosed){ | ||
if(isLargeVehiclesAccommodated){ | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActiveTruckClosed } /> | ||
|
||
} else { | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActiveClosed } /> | ||
} | ||
|
||
} | ||
else{ | ||
if(isLargeVehiclesAccommodated){ | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActiveTruck } /> | ||
|
||
} else { | ||
return <img className={'rest_stop_-icon-img'} src={restStopIconActive } /> | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.