Page MenuHomeSealhub

form-header.ts
No OneTemporary

form-header.ts

import { FormControl, FormControlContext } from "./form-control.js";
export class FormHeader extends FormControl {
role = <const>"decoration";
constructor(
public text: string,
public isVisible: (
fctx: FormControlContext
) => Promise<boolean> = async () => true
) {
super();
}
async render(fctx: FormControlContext) {
const isVsbl = await this.isVisible(fctx);
return isVsbl ? `<h2>${this.text}</h2>` : "";
}
}

File Metadata

Mime Type
text/x-java
Expires
Wed, May 7, 19:39 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625794
Default Alt Text
form-header.ts (434 B)

Event Timeline