refacor
This commit is contained in:
1 parent
3edfbc19f6
commit
2f416a1325
15 files changed
+112
-118
No files matched your search
@@ -0,0 +1,3 @@
|
||||
.Time {
|
||||
padding: 0 15px;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
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()}
|
||||
/>
|
||||
}
|
||||
Reference in new issue
Block a user