fix(FE): Fixes the background color of the dashboards full screen view as per the mode selected i.e dark or light mode (#4175)

* fix: full screen bg color of graphs as per dark mode

* fix: colors from the constants
This commit is contained in:
Avijeet Pandey 2023-12-08 11:53:56 +05:30 committed by GitHub
parent 16502feaad
commit 170e5e1686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import './GridCardLayout.styles.scss';
import { PlusOutlined, SaveFilled } from '@ant-design/icons'; import { PlusOutlined, SaveFilled } from '@ant-design/icons';
import { SOMETHING_WENT_WRONG } from 'constants/api'; import { SOMETHING_WENT_WRONG } from 'constants/api';
import { PANEL_TYPES } from 'constants/queryBuilder'; import { PANEL_TYPES } from 'constants/queryBuilder';
import { themeColors } from 'constants/theme';
import { useUpdateDashboard } from 'hooks/dashboard/useUpdateDashboard'; import { useUpdateDashboard } from 'hooks/dashboard/useUpdateDashboard';
import useComponentPermission from 'hooks/useComponentPermission'; import useComponentPermission from 'hooks/useComponentPermission';
import { useIsDarkMode } from 'hooks/useDarkMode'; import { useIsDarkMode } from 'hooks/useDarkMode';
@ -155,6 +156,7 @@ function GraphLayout({ onAddPanelHandler }: GraphLayoutProps): JSX.Element {
onLayoutChange={setLayouts} onLayoutChange={setLayouts}
draggableHandle=".drag-handle" draggableHandle=".drag-handle"
layout={layouts} layout={layouts}
style={{ backgroundColor: isDarkMode ? '' : themeColors.snowWhite }}
> >
{layouts.map((layout) => { {layouts.map((layout) => {
const { i: id } = layout; const { i: id } = layout;