13 lines
326 B
TypeScript
Raw Normal View History

2024-12-27 15:42:51 +03:00
import { Variable, GLib } from "astal"
export default function Time({ format = "%H:%M - %A %e." }) {
const time = Variable<string>("").poll(1000, () =>
GLib.DateTime.new_now_local().format(format)!)
return <label
className="Time"
onDestroy={() => time.drop()}
label={time()}
/>
}