25 lines
507 B
JavaScript
25 lines
507 B
JavaScript
|
const time = Variable("", {
|
||
|
poll: [1000, 'date "+%H:%M"'],
|
||
|
})
|
||
|
|
||
|
const date = Variable("", {
|
||
|
poll: [1000, 'date "+%Y-%m-%d"'],
|
||
|
})
|
||
|
|
||
|
export function Clock() {
|
||
|
return Widget.Box({
|
||
|
className: "clock",
|
||
|
vertical: true,
|
||
|
children: [
|
||
|
Widget.Label({
|
||
|
className: "time",
|
||
|
label: time.bind(),
|
||
|
}),
|
||
|
Widget.Label({
|
||
|
className: "date",
|
||
|
label: date.bind(),
|
||
|
}),
|
||
|
],
|
||
|
})
|
||
|
}
|