@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
33 lines • 3.84 kB
JavaScript
import React from "react";
import Grid from "@material-ui/core/Grid";
import _ from "lodash";
import { MuiCheckbox, MuiHeader, MuiSelect, MuiTextInput } from "../";
function FormSection(_ref) {var control = _ref.control,errors = _ref.errors,index = _ref.index,classes = _ref.classes;
var fieldPrefix = "controls[".concat(index, "]");
return /*#__PURE__*/React.createElement("div", { className: classes.root }, /*#__PURE__*/
React.createElement(Grid, { className: classes.panel, container: true, spacing: 3 }, /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12 }, /*#__PURE__*/
React.createElement(MuiHeader, { actions: [], title: "General - Control", description: "Control information for the form" })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiTextInput, { id: "".concat(fieldPrefix, ".name"), name: "".concat(fieldPrefix, ".name"), label: "Field Name", control: control, errors: _.get(control, "".concat(fieldPrefix, ".name")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiSelect, { id: "".concat(fieldPrefix, ".type"), name: "".concat(fieldPrefix, ".type"), options: [], control: control, label: "Field Type", errors: _.get(control, "".concat(fieldPrefix, ".type")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiTextInput, { id: "".concat(fieldPrefix, ".controlType"), name: "".concat(fieldPrefix, ".controlType"), options: [], control: control, label: "Field Control Type", errors: _.get(control, "".concat(fieldPrefix, ".controlType")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiTextInput, { id: "".concat(fieldPrefix, ".placeholder"), name: "".concat(fieldPrefix, ".placeholder"), label: "Field Placeholder", control: control, errors: _.get(control, "".concat(fieldPrefix, ".placeholder")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiTextInput, { id: "".concat(fieldPrefix, ".label"), name: "".concat(fieldPrefix, ".label"), label: "Field Label", control: control, errors: _.get(control, "".concat(fieldPrefix, ".label")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 3 }, /*#__PURE__*/
React.createElement(MuiTextInput, { id: "".concat(fieldPrefix, ".tooltip"), name: "".concat(fieldPrefix, ".tooltip"), label: "Field Tooltip", control: control, errors: _.get(control, "".concat(fieldPrefix, ".tooltip")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 2 }, /*#__PURE__*/
React.createElement(MuiCheckbox, { id: "".concat(fieldPrefix, ".active"), name: "".concat(fieldPrefix, ".active"), label: "Active", control: control, errors: _.get(control, "".concat(fieldPrefix, ".active")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 2 }, /*#__PURE__*/
React.createElement(MuiCheckbox, { id: "".concat(fieldPrefix, ".readonly"), name: "".concat(fieldPrefix, ".readonly"), label: "Readonly", control: control, errors: _.get(control, "".concat(fieldPrefix, ".readonly")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12, md: 2 }, /*#__PURE__*/
React.createElement(MuiCheckbox, { id: "".concat(fieldPrefix, ".required"), name: "".concat(fieldPrefix, ".required"), label: "Required", control: control, errors: _.get(control, "".concat(fieldPrefix, ".required")) })), /*#__PURE__*/
React.createElement(Grid, { item: true, xs: 12 }, /*#__PURE__*/
React.createElement(MuiHeader, { actions: [], title: "Validations - Control", description: "Validations information for the form" }))));
}
export default FormSection;
//# sourceMappingURL=MuiBuilderControl.js.map