Skip to content

Commit

Permalink
Add tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Sep 23, 2023
1 parent dac7b1f commit e3fd9f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/components/MapLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Link } from 'react-router-dom';
import transitNowIcon from '../resources/transitnow.png';
import './MapLinks.scss';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';

function MapLinks() {
return (
<div className="map-links">
<Link to="/about" className="leaflet-control"><img src={transitNowIcon} height="35" width="35" alt="Transit Now" /></Link>
<Link to="/routes" className="leaflet-control"><FontAwesomeIcon icon={faRoute} fixedWidth={true} size={'2x'} /></Link>
<OverlayTrigger placement='left' overlay={<Tooltip>About</Tooltip>}>
<Link to="/about" className="leaflet-control"><img src={transitNowIcon} height="35" width="35" alt="Transit Now" /></Link>
</OverlayTrigger>
<OverlayTrigger placement='left' overlay={<Tooltip>Routes</Tooltip>}>
<Link to="/routes" className="leaflet-control"><FontAwesomeIcon icon={faRoute} fixedWidth={true} size={'2x'} /></Link>
</OverlayTrigger>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TransitMap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
border: 2px solid rgba(0,0,0,0.2);
background-color: white;
border-radius: 5px;
margin-bottom: 5px;
margin-bottom: 0.5rem;
}
}

Expand Down

0 comments on commit e3fd9f4

Please sign in to comment.