feat: Behaved start

This commit is contained in:
cha0s 2021-01-29 15:58:08 -06:00
parent d2f84a4be5
commit 74c71f36be

View File

@ -0,0 +1,39 @@
import {join} from 'path';
import {PropTypes, React} from '@latus/react';
import Expressions from '../behavior-components/expressions';
const Behaved = ({
entity,
json,
path,
}) => (
<div className="behaved">
<label>
Routines
{Object.entries(json.params.routines).map(([key, expressions]) => (
<Expressions
context={entity.context}
expressions={expressions}
path={join(path, 'params/routines', key)}
/>
))}
</label>
</div>
);
Behaved.propTypes = {
entity: PropTypes.shape({
context: PropTypes.shape({}),
}).isRequired,
json: PropTypes.shape({
params: PropTypes.shape({
routines: PropTypes.shape({}),
}),
state: PropTypes.shape({}),
}).isRequired,
path: PropTypes.string.isRequired,
};
export default Behaved;