idurar / idurar-erp-crm

Free Open Source ERP CRM Accounting Invoicing Software | Node Js React
https://cloud.idurarapp.com
GNU Affero General Public License v3.0
6.57k stars 2.03k forks source link

Fix/adding dark light mode functionality #1167

Open dakshmehta007 opened 2 months ago

dakshmehta007 commented 2 months ago

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.