Page MenuHomeSealhub

element-editor.jsx
No OneTemporary

Authored By
Unknown
Size
682 B
Referenced Files
None
Subscribers
None

element-editor.jsx

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

Mime Type
application/javascript
Expires
Sat, Nov 28, 03:28 (1 d, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1220471
Default Alt Text
element-editor.jsx (682 B)

Event Timeline