Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F969362
component-input-structured.tsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
component-input-structured.tsx
View Options
import
type
{
BaseContext
}
from
"koa"
;
import
type
{
ComponentArgument
,
Structured
}
from
"@sealcode/jdd"
;
import
type
{
StatefulPage
}
from
"@sealcode/sealgen"
;
import
{
TempstreamJSX
}
from
"tempstream"
;
import
{
ComponentInput
}
from
"./component-input.js"
;
import
type
{
JDDPageState
}
from
"./jdd-page.js"
;
import
type
{
ComponentPreviewActions
}
from
"./component-preview-actions.js"
;
export
function
ComponentInputStructured
<
T
extends
Structured
<
Record
<
string
,
ComponentArgument
<
unknown
>>>
>
({
state
,
ctx
,
arg_path
,
arg
,
value
,
rerender_callback
,
page
,
}
:
{
state
:
JDDPageState
;
ctx
:
BaseContext
;
arg_path
:
string
[];
arg
:
T
;
value
:
Record
<
string
,
unknown
>
;
rerender_callback
?:
string
;
page
:
StatefulPage
<
JDDPageState
,
typeof
ComponentPreviewActions
>
;
})
{
return
(
<
fieldset
>
<
legend
>
{
arg_path
.
at
(
-
1
)}
<
/legend>
{
Object
.
entries
(
arg
.
structure
).
map
(([
arg_name
,
arg
])
=>
(
<
div
>
<
ComponentInput
{...{
ctx
,
state
,
arg_path
:
[...
arg_path
,
arg_name
],
arg
,
value
:
value
[
arg_name
],
rerender_callback
,
page
,
}}
/>
<
/div>
))}
<
/fieldset>
);
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Nov 22, 20:15 (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
547740
Default Alt Text
component-input-structured.tsx (1 KB)
Attached To
Mode
rPLAY Sealious playground
Attached
Detach File
Event Timeline
Log In to Comment