feat: add missing propTypes

This commit is contained in:
kasia.oczkowska
2024-06-05 13:26:56 +01:00
parent 725b38c697
commit 3f5df118a0
53 changed files with 597 additions and 81 deletions

View File

@@ -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;