mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
💄 Fix Calendar widget UI
This commit is contained in:
@@ -45,7 +45,7 @@ interface CalendarTileProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function CalendarTile({ widget }: CalendarTileProps) {
|
function CalendarTile({ widget }: CalendarTileProps) {
|
||||||
const { secondaryColor } = useColorTheme();
|
const { secondaryColor, primaryColor } = useColorTheme();
|
||||||
const { name: configName } = useConfigContext();
|
const { name: configName } = useConfigContext();
|
||||||
const { classes, cx } = useStyles(secondaryColor);
|
const { classes, cx } = useStyles(secondaryColor);
|
||||||
const { colorScheme, colors } = useMantineTheme();
|
const { colorScheme, colors } = useMantineTheme();
|
||||||
@@ -66,26 +66,29 @@ 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: 0,
|
||||||
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={{
|
||||||
calendarHeader: {
|
calendarHeader: {
|
||||||
marginRight: 40,
|
margin: 0,
|
||||||
marginLeft: 40,
|
padding: 0,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
allowLevelChange={false}
|
allowLevelChange={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user