17 lines
381 B
TypeScript
17 lines
381 B
TypeScript
import { Variable } from "astal";
|
|
import computeStorage from "./helpers";
|
|
|
|
export default function Storage() {
|
|
const storage_usage = Variable<string>("").poll(5000, () => computeStorage());
|
|
|
|
return (
|
|
<box className="storage">
|
|
<label
|
|
className="Storage"
|
|
onDestroy={() => storage_usage.drop()}
|
|
label={storage_usage()}
|
|
/>
|
|
</box>
|
|
);
|
|
}
|