Date widget styling
This commit is contained in:
@@ -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>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user