refactor: JSON editing for NoTrait
This commit is contained in:
parent
d7c93d591d
commit
00c1da7420
|
@ -6,6 +6,7 @@ import {
|
|||
React,
|
||||
useLatus,
|
||||
} from '@latus/react';
|
||||
import {JsonResourceController} from '@persea/json';
|
||||
import {
|
||||
Tab,
|
||||
Tabs,
|
||||
|
@ -13,15 +14,12 @@ import {
|
|||
TabPanel,
|
||||
} from 'react-tabs';
|
||||
|
||||
const NoTraitRenderer = ({json}) => (
|
||||
<pre>
|
||||
<code>
|
||||
{JSON.stringify(json, null, 2)}
|
||||
</code>
|
||||
</pre>
|
||||
const NoTraitRenderer = ({path, json}) => (
|
||||
<JsonResourceController.Component path={path} resource={json} />
|
||||
);
|
||||
|
||||
NoTraitRenderer.propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
json: PropTypes.shape({}).isRequired,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user