Closed seanmturley closed 9 months ago
The lightTheme
is now controlled by App
state, and can be toggled by the ToggleSwitch
in the DropdownMenu
To avoid an extra layer of prop drilling and reduce overall complexity, the NavBar
component was removed. Instead, the PageHeadings
, SearchBar
, and DropdownMenu
are now directly rendered inside the MainLayout
.
There may be room for further refinement by lifting components all the way up to the App
level, but this is somewhat limited by the need for useNavigation
inside the MainLayout
(useNavigation
has to be called within a Router
).
There may be room for further refinement by lifting components all the way up to the App level...
Upon further investigation, this turns out not to be practical as useLocation
and useNavigate
are used in PageHeadings
and SearchBar
respectively, both of which must be called within the context of a Router
.
Description
The user will be able to switch between dark and light colour themes (dark is the default).
Implementation
See this CSS Tricks article for an example of the above approach.