diff --git a/src/components/modules/calendar/CalendarModule.tsx b/src/components/modules/calendar/CalendarModule.tsx index edde221ea..6939657be 100644 --- a/src/components/modules/calendar/CalendarModule.tsx +++ b/src/components/modules/calendar/CalendarModule.tsx @@ -1,5 +1,5 @@ /* eslint-disable react/no-children-prop */ -import { Box, Divider, Indicator, Popover, ScrollArea, createStyles } from '@mantine/core'; +import { Box, Divider, Indicator, Popover, ScrollArea, createStyles, useMantineColorScheme } from '@mantine/core'; import React, { useEffect, useState } from 'react'; import { Calendar } from '@mantine/dates'; import { IconCalendar as CalendarIcon } from '@tabler/icons'; @@ -25,6 +25,7 @@ export const CalendarModule: IModule = { export default function CalendarComponent(props: any) { const { config } = useConfig(); + const { colorScheme } = useMantineColorScheme(); const { secondaryColor } = useColorTheme(); const useStyles = createStyles(() => ({ weekend: { @@ -99,8 +100,8 @@ export default function CalendarComponent(props: any) { onChange={(day: any) => {}} dayStyle={(date) => date.getDay() === today.getDay() && date.getDate() === today.getDate() - ? { backgroundColor: '#2C2E33' } - : null + ? { backgroundColor: colorScheme === 'dark' ? '#2C2E33' : '#f8f9fa' } + : {} } dayClassName={(date, modifiers) => cx({ [classes.weekend]: modifiers.weekend })