Page MenuHomeSealhub

tabs-demo.page.tsx
No OneTemporary

Authored By
Unknown
Size
996 B
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,
"TabsDemo",
<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
Sat, Nov 28, 02:20 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1213912
Default Alt Text
tabs-demo.page.tsx (996 B)

Event Timeline