Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22422984
element-editor.jsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
682 B
Referenced Files
None
Subscribers
None
element-editor.jsx
View Options
import
React
from
'react'
;
export
default
function
ElementEditor
({
component
,
componentProps
,
onChange
})
{
function
createControls
()
{
let
controls
=
[];
for
(
const
prop
in
component
.
propsControls
)
{
controls
.
push
(
component
.
propsControls
[
prop
]({
name
:
prop
,
value
:
componentProps
[
prop
],
onChange
:
newValue
=>
{
onChange
({
...
componentProps
,
[
prop
]
:
newValue
});
},
})
);
}
return
controls
;
}
return
(
<
div
style
=
{{
backgroundColor
:
'#fdf6e3'
,
display
:
'flex'
,
flexFlow
:
'column'
,
height
:
'auto'
,
margin
:
'1rem'
,
padding
:
'1rem'
,
width
:
'30rem'
,
}}
>
{
createControls
()}
<
/div>
);
}
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 03:28 (1 d, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1220471
Default Alt Text
element-editor.jsx (682 B)
Attached To
Mode
rSEALPAGE Sealpage
Attached
Detach File
Event Timeline