ags: To derivation

This commit is contained in:
2025-01-25 19:38:13 +03:00
parent 290b694877
commit e46c205fe3
15 changed files with 24 additions and 5 deletions
@@ -0,0 +1,12 @@
import { Variable, GLib } from "astal"
export default function Time({ format = "%e %b - %H:%M %a" }) {
const time = Variable<string>("").poll(1000, () =>
GLib.DateTime.new_now_local().format(format)!)
return <label
className="Time"
onDestroy={() => time.drop()}
label={time()}
/>
}