Adding dark-light mode functionality to the application
Related Issues
Fixes #1165
Detailed Description
This PR introduces dark-light mode functionality to the application. The key changes include:
Theme Context: Created a ThemeContext to manage the current theme state (light or dark) and provide a method to toggle
between themes.
Theme Provider: Wrapped the application with a ThemeProvider to ensure the theme state is accessible throughout the app.
Theme Toggle Component: Added a ThemeToggle component that allows users to switch between light and dark modes.
Styling Adjustments: Updated CSS to support both light and dark themes, ensuring a consistent and visually appealing user experience.
Changes
ThemeContext.jsx:
Created a context to manage theme state.
Added a toggleTheme function to switch between light and dark modes.
Stored the current theme in localStorage.
ThemeProvider.jsx:
Wrapped the application with ThemeProvider to provide theme context to all components.
ThemeToggle.jsx:
Added a toggle switch to allow users to change themes.
Integrated the toggle with the ThemeContext.
CSS Updates:
Updated styles to support both themes.
Ensured all components adapt to the selected theme.
Description
Adding dark-light mode functionality to the application
Related Issues
Fixes #1165
Detailed Description
This PR introduces dark-light mode functionality to the application. The key changes include:
Theme Context: Created a ThemeContext to manage the current theme state (light or dark) and provide a method to toggle
between themes.
Theme Provider: Wrapped the application with a ThemeProvider to ensure the theme state is accessible throughout the app.
Theme Toggle Component: Added a ThemeToggle component that allows users to switch between light and dark modes.
Styling Adjustments: Updated CSS to support both light and dark themes, ensuring a consistent and visually appealing user experience.
Changes
ThemeContext.jsx:
Created a context to manage theme state. Added a toggleTheme function to switch between light and dark modes. Stored the current theme in localStorage.
ThemeProvider.jsx:
Wrapped the application with ThemeProvider to provide theme context to all components.
ThemeToggle.jsx:
Added a toggle switch to allow users to change themes. Integrated the toggle with the ThemeContext.
CSS Updates:
Updated styles to support both themes. Ensured all components adapt to the selected theme.