Skip to content

Commit

Permalink
DBC22-1880: styling for route search swap button
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrel-oxd committed Mar 21, 2024
1 parent d7761b2 commit 732a614
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/frontend/src/Components/map/RouteSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
faCircleDot,
faLocationDot
} from '@fortawesome/free-solid-svg-icons';
import { faArrowUpArrowDown } from '@fortawesome/pro-solid-svg-icons';
import Button from 'react-bootstrap/Button';
import Spinner from 'react-bootstrap/Spinner';

Expand Down Expand Up @@ -105,7 +106,7 @@ export default function RouteSearch(props) {
}

{!!searchLocationFrom.length && !!searchLocationTo.length &&
<Button onClick={() => swapHandler()}>Swap</Button>
<Button className="swap-button" onClick={() => swapHandler()}><FontAwesomeIcon icon={faArrowUpArrowDown} /></Button>
}
</div>
);
Expand Down
19 changes: 19 additions & 0 deletions src/frontend/src/Components/map/RouteSearch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
padding: 1rem 1rem 0;
z-index: 5;

.swap-button{
position: relative;
display: row;
top: -53px;
left: 292px;
padding: 8px 4px 8px 4px;
gap: 6px;
color: black;
border-radius: 32px 32px 32px 32px;
border: 1px 0px 0px 0px;
opacity: 0px;
border: 1px solid #D9D9D9;
background: #FFFFFF;

&:hover {
background-color: grey;
}
}

.typeahead-container {
position: relative;
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/pages/CamerasListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export default function CamerasListPage() {
<div className="route-display-container">
<RouteSearch routeEdit={routeEdit} />

{!routeEdit &&
{/* {!routeEdit &&
<Button onClick={() => setRouteEdit(true)}>Change</Button>
}
} */}
</div>

<div className="search-container">
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/pages/EventsListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ export default function EventsListPage() {
<div className="route-display-container">
<RouteSearch routeEdit={routeEdit} />

{!routeEdit &&
{/* {!routeEdit &&
<Button onClick={() => setRouteEdit(true)}>Change</Button>
}
} */}
</div>
}

Expand Down

0 comments on commit 732a614

Please sign in to comment.