Date widget styling

This commit is contained in:
ajnart
2023-01-03 20:26:59 +09:00
parent 4f948021dd
commit a809262647

View File

@@ -16,7 +16,7 @@ const definition = defineWidget({
}, },
}, },
gridstack: { gridstack: {
minWidth: 4, minWidth: 2,
minHeight: 2, minHeight: 2,
maxWidth: 12, maxWidth: 12,
maxHeight: 12, maxHeight: 12,
@@ -35,12 +35,10 @@ function DateTile({ widget }: DateTileProps) {
const formatString = widget.properties.display24HourFormat ? 'HH:mm' : 'h:mm A'; const formatString = widget.properties.display24HourFormat ? 'HH:mm' : 'h:mm A';
return ( return (
<Center style={{ height: '100%' }}> <Stack spacing="xs" justify="space-around" align="center" style={{ height: '100%' }}>
<Stack spacing="xs"> <Title>{dayjs(date).format(formatString)}</Title>
<Title>{dayjs(date).format(formatString)}</Title> <Text size="lg">{dayjs(date).format('dddd, MMMM D')}</Text>
<Text size="lg">{dayjs(date).format('dddd, MMMM D')}</Text> </Stack>
</Stack>
</Center>
); );
} }