From 6477b76bacf77f62e531de5e644e8756ea5808e6 Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 19 Jan 2023 11:13:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=84=20Fix=20Calendar=20widget=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/calendar/CalendarTile.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index b2dd3bfb6..190557982 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -45,7 +45,7 @@ interface CalendarTileProps { } function CalendarTile({ widget }: CalendarTileProps) { - const { secondaryColor } = useColorTheme(); + const { secondaryColor, primaryColor } = useColorTheme(); const { name: configName } = useConfigContext(); const { classes, cx } = useStyles(secondaryColor); const { colorScheme, colors } = useMantineTheme(); @@ -66,26 +66,29 @@ function CalendarTile({ widget }: CalendarTileProps) { return ( {}} firstDayOfWeek={widget.properties.sundayStart ? 'sunday' : 'monday'} dayStyle={(date) => ({ - margin: 1, + margin: 0, backgroundColor: isToday(date) ? colorScheme === 'dark' ? colors.dark[5] : colors.gray[0] : undefined, })} + hideWeekdays styles={{ calendarHeader: { - marginRight: 40, - marginLeft: 40, + margin: 0, + padding: 0, }, }} allowLevelChange={false} From cd000131c1c0d0acfa7a7c030482e44efcda8442 Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 19 Jan 2023 11:15:56 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=92=84=20Fix=20Calendar=20widget=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/calendar/CalendarTile.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index 190557982..7518a038b 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -45,7 +45,7 @@ interface CalendarTileProps { } function CalendarTile({ widget }: CalendarTileProps) { - const { secondaryColor, primaryColor } = useColorTheme(); + const { secondaryColor } = useColorTheme(); const { name: configName } = useConfigContext(); const { classes, cx } = useStyles(secondaryColor); const { colorScheme, colors } = useMantineTheme(); @@ -77,7 +77,7 @@ function CalendarTile({ widget }: CalendarTileProps) { onChange={() => {}} firstDayOfWeek={widget.properties.sundayStart ? 'sunday' : 'monday'} dayStyle={(date) => ({ - margin: 0, + margin: -1, backgroundColor: isToday(date) ? colorScheme === 'dark' ? colors.dark[5] @@ -86,7 +86,12 @@ function CalendarTile({ widget }: CalendarTileProps) { })} hideWeekdays styles={{ + weekdayCell: { + margin: 0, + padding: 0, + }, calendarHeader: { + position: 'relative', margin: 0, padding: 0, },