updated time
This commit is contained in:
1 parent
4439ccd7bb
commit
874696d394
1 file changed
+10
-8
@@ -1,12 +1,14 @@
|
||||
import { Variable, GLib } from "astal"
|
||||
import { Variable, GLib } from "astal";
|
||||
|
||||
export default function Time({ format = "%A %e, %H:%M" }) {
|
||||
const time = Variable<string>("").poll(1000, () =>
|
||||
GLib.DateTime.new_now_local().format(format)!)
|
||||
const time = Variable<string>("").poll(
|
||||
1000,
|
||||
() => GLib.DateTime.new_now_local().format(format)!,
|
||||
);
|
||||
|
||||
return <label
|
||||
className="Time"
|
||||
onDestroy={() => time.drop()}
|
||||
label={time()}
|
||||
/>
|
||||
return (
|
||||
<button className="Time" onClicked="swaync-client -t">
|
||||
<label onDestroy={() => time.drop()} label={time()} />
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user