mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 12:51:54 +05:30
13 lines
294 B
TypeScript
13 lines
294 B
TypeScript
import { GLib, Variable } from "astal";
|
|
|
|
export const Time = () => {
|
|
const time = Variable("").poll(
|
|
1000,
|
|
() => GLib.DateTime.new_now_local().format("%a %b %d - %I:%M:%S %p")!,
|
|
);
|
|
|
|
return (
|
|
<label cssClasses={["pill"]} onDestroy={() => time.drop()} label={time()} />
|
|
);
|
|
};
|