Page MenuHomeSealhub

tabs-demo.page.tsx
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

tabs-demo.page.tsx

import type { Context } from "koa";
import { TempstreamJSX } from "tempstream";
import { Page } from "@sealcode/sealgen";
import html from "../html.js";
import { tabs } from "./common/tabs/tabs.js";
export const actionName = "TabsDemo";
export default new (class TabsDemoPage extends Page {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async canAccess(_: Context) {
return { canAccess: true, message: "" };
}
async render(ctx: Context) {
return html({
ctx,
title: "TabsDemo",
description: "",
body: (
<div>
{tabs({
default_tab: "tab1",
active_navbar_tab_style:
"font-weight: bold; text-decoration: underline",
tabs: [
{
id: "tab1",
label: "First tab",
content: (
<div>
<h2>This is tab 1</h2>
</div>
),
},
{
id: "tab2",
label: "Second tab",
content: (
<div>
<h2>And this is tab 2</h2>
</div>
),
},
],
})}
</div>
),
});
}
})();

File Metadata

Mime Type
application/javascript
Expires
Fri, Nov 27, 16:29 (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1190054
Default Alt Text
tabs-demo.page.tsx (1 KB)

Event Timeline