UNPKG

@talend/react-components

Version:
35 lines 919 B
import PropTypes from 'prop-types'; import classNames from 'classnames'; import { TreeHeader } from '../Headers'; import { Tree } from '../Core'; import getDefaultT from '../../translate'; import theme from './ModelViewer.module.scss'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export function ModelViewer({ t, ...props }) { return /*#__PURE__*/_jsxs("div", { className: classNames(theme['tc-model'], 'tc-model'), children: [/*#__PURE__*/_jsx(TreeHeader, { title: t('MODEL_VIEWER_HEADER_TITLE', { defaultValue: 'Data model' }) }), /*#__PURE__*/_jsx(Tree, { ...props, jsonpath: "$", index: 0, level: 0, type: "array", noRoot: true })] }); } ModelViewer.propTypes = { t: PropTypes.func }; ModelViewer.defaultProps = { t: getDefaultT() }; export default ModelViewer; //# sourceMappingURL=ModelViewer.component.js.map