UNPKG

react-antd-admin-panel

Version:

Easy prototyping admin panel using React and Antd

21 lines 722 B
import React from 'react'; import { Result as ResultAnt } from 'antd'; import Section from "../../Section"; const Result = (props) => { const model = props.model; let addProps = {}; if (model.natives) { model.natives.forEach((r) => { if (model[`_${r}`]) addProps[r] = model[`_${r}`]; }); } model._fields.forEach((r) => { if (!addProps['extra']) addProps['extra'] = []; addProps['extra'].push(React.createElement(Section, { key: r._key, main: props.main, section: r })); }); return React.createElement(ResultAnt, Object.assign({}, addProps)); }; export default Result; //# sourceMappingURL=Result.js.map