mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
fix: calendar current day for light theme
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user