feat: add missing propTypes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { JSONTree } from 'react-json-tree';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const theme = {
|
||||
scheme: 'inspector',
|
||||
author: 'Alexander Kuznetsov (alexkuz@gmail.com)',
|
||||
@@ -36,8 +38,10 @@ const theme = {
|
||||
// base0F - Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>
|
||||
base0F: '#a16946',
|
||||
};
|
||||
|
||||
function JSONViewer(props) {
|
||||
const { data } = props;
|
||||
|
||||
return (
|
||||
<JSONTree
|
||||
hideRoot
|
||||
@@ -48,4 +52,9 @@ function JSONViewer(props) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
JSONViewer.propTypes = {
|
||||
data: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default JSONViewer;
|
||||
|
Reference in New Issue
Block a user