UNPKG

@makeen.io/material-ui-kit

Version:
19 lines 880 B
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";import React from "react"; import FormControl from "../FormControl"; import FormGroup from "../FormGroup"; import FormLayout from "../FormLayout"; var FormComponentType = { Control: FormControl, Group: FormGroup, Layout: FormLayout }; export default (function (_ref) {var component = _ref.component,props = _ref.props;var _component$split = component.split("."),_component$split2 = _slicedToArray(_component$split, 2),definition = _component$split2[0],componentName = _component$split2[1]; var FormComponent = FormComponentType[definition]; if (!FormComponent) { console.error("No component definition exists for ".concat(definition)); return null; } return /*#__PURE__*/React.createElement(FormComponent, { props: props, component: componentName }); }); //# sourceMappingURL=index.js.map