dijkstra-frontend/src/components/Map.jsx

28 lines
905 B
React
Raw Normal View History

2020-10-07 21:27:30 +00:00
import React from 'react';
import { SvgLoader, SvgProxy } from 'react-svgmt';
export default function Map({ highlighted }) {
return (
<div>
<SvgLoader
path='/belgium-map.svg'
style={{
width: '500px',
height: '500px',
}}
>
<SvgProxy selector='.ghent' fill={highlighted.ghent} />
<SvgProxy selector='.brussels' fill={highlighted.brussels} />
<SvgProxy selector='.antwerp' fill={highlighted.antwerp} />
<SvgProxy selector='.tournai' fill={highlighted.tournai} />
<SvgProxy selector='.mechelen' fill={highlighted.mechelen} />
<SvgProxy selector='.bruges' fill={highlighted.bruges} />
<SvgProxy selector='.mons' fill={highlighted.mons} />
<SvgProxy selector='.liege' fill={highlighted.liege} />
<SvgProxy selector='.namur' fill={highlighted.namur} />
<SvgProxy selector='.arlon' fill={highlighted.arlon} />
</SvgLoader>
</div>
);
}