Merge pull request #594 from ajnart/caledar-styling

💄 Fix Calendar widget UI
This commit is contained in:
Thomas Camlong
2023-01-20 11:18:07 +09:00
committed by GitHub

View File

@@ -66,26 +66,34 @@ function CalendarTile({ widget }: CalendarTileProps) {
return ( return (
<Group grow style={{ height: '100%' }}> <Group grow style={{ height: '100%' }}>
<Calendar <Calendar
m={0}
p={0}
month={month} month={month}
// Should be offset 5px to the left // Should be offset 5px to the left
style={{ position: 'relative', top: -10 }} style={{ position: 'relative', top: -15 }}
onMonthChange={setMonth} onMonthChange={setMonth}
size="xs" size="xs"
fullWidth fullWidth
onChange={() => {}} onChange={() => {}}
firstDayOfWeek={widget.properties.sundayStart ? 'sunday' : 'monday'} firstDayOfWeek={widget.properties.sundayStart ? 'sunday' : 'monday'}
dayStyle={(date) => ({ dayStyle={(date) => ({
margin: 1, margin: -1,
backgroundColor: isToday(date) backgroundColor: isToday(date)
? colorScheme === 'dark' ? colorScheme === 'dark'
? colors.dark[5] ? colors.dark[5]
: colors.gray[0] : colors.gray[0]
: undefined, : undefined,
})} })}
hideWeekdays
styles={{ styles={{
weekdayCell: {
margin: 0,
padding: 0,
},
calendarHeader: { calendarHeader: {
marginRight: 40, position: 'relative',
marginLeft: 40, margin: 0,
padding: 0,
}, },
}} }}
allowLevelChange={false} allowLevelChange={false}