🐛 Fix calendar sizing (#852)

This commit is contained in:
Manuel
2023-04-24 21:39:04 +02:00
committed by GitHub
parent 2494ee6a34
commit f4df411d47
3 changed files with 25 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
import { ColorScheme, useMantineTheme } from '@mantine/core';
import { isToday } from '../../tools/shared/time/date.tool';
export const getBgColorByDateAndTheme = (colorScheme: ColorScheme, date: Date) => {
if (!isToday(date)) {
return undefined;
}
const { colors } = useMantineTheme();
if (colorScheme === 'dark') {
return colors.dark[5];
}
return colors.gray[2];
};