diff --git a/http/render.tsx b/http/render.tsx index 02d3bb678..a4bf35e6b 100644 --- a/http/render.tsx +++ b/http/render.tsx @@ -115,6 +115,60 @@ export class Render { this.#options.props, ); if (!html) return el; + + const RootElement = () => { + if (this.#options.theme && this.#options.themeColor === "auto") { + return ( +
+ {el} +
+ ); + } + + if (this.#options.theme && this.#options.themeColor === "dark") { + return ( +
+ {el} +
+ ); + } + + if (this.#options.theme && this.#options.themeColor === "light") { + return ( +
+ {el} +
+ ); + } + + return ( +
+ {el} +
+ ); + }; + return ( )} - -
- {el} -
- {this.#options.props && ( -
+ {this.#options.theme + ? ( + + + {this.#options.props && ( +
+ )} + {this.#options.html?.body?.script && + this.#options.html?.body?.script.map((s) => ( +