Page MenuHomeSealhub

sortable.page.tsx
No OneTemporary

sortable.page.tsx

import type { Context } from "koa";
import { TempstreamJSX } from "tempstream";
import { Page } from "@sealcode/sealgen";
import html from "../../html.js";
import { sortable } from "../common/sortable/sortable.js";
export const actionName = "SortableDemo";
export default new (class SortableDemoPage 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,
"SortableDemo",
<div>
<h2>Short list</h2>
{sortable({
items: ["One", "Two", "Three", "Four", "Five"].map((e) => (
<div>{e}</div>
)),
})}
<h2>Long list</h2>
{sortable({
items: "a"
.repeat(100)
.split("")
.map((_, index) => <div>{index}</div>),
})}
</div>
);
}
})();

File Metadata

Mime Type
text/x-java
Expires
Mon, Dec 23, 00:57 (4 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
556727
Default Alt Text
sortable.page.tsx (852 B)

Event Timeline