mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-17 02:31:18 +01:00
🐛 Fix small display bug in calendar widget
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { Box, Indicator, IndicatorProps, Popover } from '@mantine/core';
|
import { Container, Indicator, IndicatorProps, Popover } from '@mantine/core';
|
||||||
import { useDisclosure } from '@mantine/hooks';
|
import { useDisclosure } from '@mantine/hooks';
|
||||||
import { MediaList } from './MediaList';
|
import { MediaList } from './MediaList';
|
||||||
import { getBgColorByDateAndTheme } from './bg-calculator';
|
|
||||||
import { MediasType } from './type';
|
import { MediasType } from './type';
|
||||||
|
|
||||||
interface CalendarDayProps {
|
interface CalendarDayProps {
|
||||||
@@ -30,14 +29,7 @@ export const CalendarDay = ({ date, medias }: CalendarDayProps) => {
|
|||||||
opened={opened}
|
opened={opened}
|
||||||
>
|
>
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Box
|
<Container p={10} onClick={open}>
|
||||||
onClick={open}
|
|
||||||
sx={(theme) => ({
|
|
||||||
margin: 5,
|
|
||||||
backgroundColor: getBgColorByDateAndTheme(theme.colorScheme, date),
|
|
||||||
})}
|
|
||||||
w="100%"
|
|
||||||
>
|
|
||||||
<DayIndicator color="red" position="bottom-start" medias={medias.books}>
|
<DayIndicator color="red" position="bottom-start" medias={medias.books}>
|
||||||
<DayIndicator color="yellow" position="top-start" medias={medias.movies}>
|
<DayIndicator color="yellow" position="top-start" medias={medias.movies}>
|
||||||
<DayIndicator color="blue" position="top-end" medias={medias.tvShows}>
|
<DayIndicator color="blue" position="top-end" medias={medias.tvShows}>
|
||||||
@@ -47,7 +39,7 @@ export const CalendarDay = ({ date, medias }: CalendarDayProps) => {
|
|||||||
</DayIndicator>
|
</DayIndicator>
|
||||||
</DayIndicator>
|
</DayIndicator>
|
||||||
</DayIndicator>
|
</DayIndicator>
|
||||||
</Box>
|
</Container>
|
||||||
</Popover.Target>
|
</Popover.Target>
|
||||||
<Popover.Dropdown>
|
<Popover.Dropdown>
|
||||||
<MediaList medias={medias} />
|
<MediaList medias={medias} />
|
||||||
|
|||||||
Reference in New Issue
Block a user