Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22417658
horizontal-scroller-demo.page.tsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
horizontal-scroller-demo.page.tsx
View Options
import
type
{
Context
}
from
"koa"
;
import
{
TempstreamJSX
}
from
"tempstream"
;
import
{
Page
}
from
"@sealcode/sealgen"
;
import
html
from
"../html.js"
;
import
{
horizontalScroller
}
from
"./common/horizontal-scroller/horizontal-scroller.js"
;
export
const
actionName
=
"HorizontalScrollerDemo"
;
export
default
new
(
class
HorizontalScrollerDemoPage
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
,
"HorizontalScrollerDemo"
,
<
div
>
{
horizontalScroller
({
elements
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
9
,
10
,
11
,
12
,
13
].
map
((
n
)
=>
(
<
div
class
=
"bignum"
>
{
n
}
<
/div>
)),
render
:
async
({
scroller
,
markers
})
=>
(
<
div
>
<
div
>
<
button
class
=
"prev-button"
type
=
"button"
data
-
action
=
"horizontal-scroller#scrollLeft"
>
{
" "
}
←
{
" "
}
<
/button>
<
button
class
=
"next-button"
type
=
"button"
data
-
action
=
"horizontal-scroller#scrollRight"
>
{
" "
}
→
{
" "
}
<
/button>
<
/div>
{
scroller
}
{
markers
}
<
/div>
),
})}
<
/div>
);
}
})();
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 02:07 (2 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1223245
Default Alt Text
horizontal-scroller-demo.page.tsx (1 KB)
Attached To
Mode
rREWRITE Configurable rewriter
Attached
Detach File
Event Timeline