🐛 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

@@ -1,7 +1,7 @@
import { Box, Indicator, IndicatorProps, Popover } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { isToday } from '../../tools/shared/time/date.tool';
import { MediaList } from './MediaList';
import { getBgColorByDateAndTheme } from './bg-calculator';
import { MediasType } from './type';
interface CalendarDayProps {
@@ -34,12 +34,9 @@ export const CalendarDay = ({ date, medias }: CalendarDayProps) => {
onClick={open}
sx={(theme) => ({
margin: 5,
backgroundColor: isToday(date)
? theme.colorScheme === 'dark'
? theme.colors.dark[5]
: theme.colors.gray[0]
: undefined,
backgroundColor: getBgColorByDateAndTheme(theme.colorScheme, date),
})}
w="100%"
>
<DayIndicator color="red" position="bottom-start" medias={medias.books}>
<DayIndicator color="yellow" position="top-start" medias={medias.movies}>