Skip to content

Commit

Permalink
Update coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
chunlaw committed Aug 19, 2023
1 parent 0b2f8ef commit f016101
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ const getThemeTokens = (mode: PaletteMode) => ({
main: "#fedb00", // yellow
contrastText: "rgba(0, 0, 0, 0.12)",
},
warning: {
main: "#3285e3",
},
}
: {
//dark mode
Expand All @@ -123,6 +126,9 @@ const getThemeTokens = (mode: PaletteMode) => ({
primary: {
main: "#fedb00", // yellow
},
warning: {
main: "#fedb00",
},
}),
},
elements: {
Expand Down
6 changes: 5 additions & 1 deletion src/components/home/SuccinctEtas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const SuccinctEtas = ({ routeId }) => {
<Box component="span">
<Box
component="span"
sx={{ ...waitTimeSx, color: highlight ? "#3285e3" : "inherit" }}
sx={{
...waitTimeSx,
color: (theme) =>
highlight ? theme.palette.warning.main : "inherit",
}}
>
{waitTime < 1 ? " - " : `${waitTime} `}
</Box>
Expand Down
5 changes: 4 additions & 1 deletion src/components/route-eta/TimeReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const TimeReport = ({
);
const waitTimeJsx = (
<Box component="span">
<Box component="span" sx={{ ...waitTimeSx, color: "#3285e3" }}>
<Box
component="span"
sx={{ ...waitTimeSx, color: (theme) => theme.palette.warning.main }}
>
{waitTime < 1 ? " - " : `${waitTime} `}
</Box>
<Box component="span" sx={{ fontSize: "0.8em" }}>
Expand Down

0 comments on commit f016101

Please sign in to comment.