🐛 Fix calendar sizing (#852)
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user