Skip to content

Commit

Permalink
Style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Oct 5, 2023
1 parent e2512ce commit 29a2058
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
4 changes: 3 additions & 1 deletion client-next/src/components/SearchBar/DateInputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export function DateInputField({

return (
<Form.Group>
<Form.Label htmlFor="datePicker">Date</Form.Label>
<Form.Label column="sm" htmlFor="datePicker">
Date
</Form.Label>
<Form.Control type="date" id="datePicker" size="sm" onChange={onChange} value={current} />
</Form.Group>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ export function DepartureArrivalSelect({

return (
<Form.Group>
<Form.Label htmlFor="departureArrivalSelect">Departure/Arrival</Form.Label>
<Form.Label column="sm" htmlFor="departureArrivalSelect">
Departure/Arrival
</Form.Label>
<Form.Select
size="sm"
onChange={(e) => (e.target.value === 'arrival' ? onChange(true) : onChange(false))}
value={tripQueryVariables.arriveBy ? 'arrival' : 'departure'}
>
Expand Down
4 changes: 3 additions & 1 deletion client-next/src/components/SearchBar/LocationInputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { Location } from '../../gql/graphql.ts';
export function LocationInputField({ location, id, label }: { location: Location; id: string; label: string }) {
return (
<Form.Group>
<Form.Label htmlFor={id}>{label}</Form.Label>
<Form.Label column="sm" htmlFor={id}>
{label}
</Form.Label>
<Form.Control
type="text"
id={id}
Expand Down
8 changes: 5 additions & 3 deletions client-next/src/components/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export function SearchBar({
<TimeInputField tripQueryVariables={tripQueryVariables} setTripQueryVariables={setTripQueryVariables} />
<DateInputField tripQueryVariables={tripQueryVariables} setTripQueryVariables={setTripQueryVariables} />
<SearchWindowInput tripQueryVariables={tripQueryVariables} setTripQueryVariables={setTripQueryVariables} />
<Button variant="primary" onClick={onRoute}>
Route
</Button>
<div className="search-bar-route-button-wrapper">
<Button variant="primary" onClick={onRoute}>
Route
</Button>
</div>
</Stack>
</section>
);
Expand Down
8 changes: 6 additions & 2 deletions client-next/src/components/SearchBar/SearchWindowInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ export function SearchWindowInput({
}) {
return (
<Form.Group>
<Form.Label htmlFor="searchWindowInput">Search window (seconds)</Form.Label>
<Form.Label column="sm" htmlFor="searchWindowInput">
Search window
</Form.Label>
<Form.Control
type="number"
id="searchWindowInput"
size="sm"
placeholder="3600"
value={tripQueryVariables.searchWindow || undefined}
prefix="seconds"
min={0}
value={tripQueryVariables.searchWindow || ''}
onChange={(event) =>
setTripQueryVariables({
...tripQueryVariables,
Expand Down
4 changes: 3 additions & 1 deletion client-next/src/components/SearchBar/TimeInputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function TimeInputField({

return (
<Form.Group>
<Form.Label htmlFor="timePicker">Time</Form.Label>
<Form.Label column="sm" htmlFor="timePicker">
Time
</Form.Label>
<Form.Control type="time" id="timePicker" size="sm" onChange={onChange} value={current} />
</Form.Group>
);
Expand Down
5 changes: 5 additions & 0 deletions client-next/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
padding-left: 1rem;
}

.search-bar-route-button-wrapper {
height: 5rem;
padding-top: 2rem;
}

.itinerary-list-container {
width: 36rem;
height: calc(100vh - 200px);
Expand Down

0 comments on commit 29a2058

Please sign in to comment.