Skip to content

Commit

Permalink
now lib is tracked in git
Browse files Browse the repository at this point in the history
  • Loading branch information
alboo89 authored and alessandro-coolshop committed Apr 2, 2019
1 parent 15b870c commit b162be5
Show file tree
Hide file tree
Showing 20 changed files with 3,521 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ npm-debug.log
node_modules
build
dist
lib
yarn.lock

package-lock.json
Expand Down
69 changes: 69 additions & 0 deletions lib/AltInputField.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});

var _react = require("react");

var _react2 = _interopRequireDefault(_react);

var _propTypes = require("prop-types");

var _propTypes2 = _interopRequireDefault(_propTypes);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function altInputField(props) {
var _props$uiSchema = props.uiSchema,
defInput = _props$uiSchema.defInput,
altInput = _props$uiSchema.altInput,
_props$uiSchema$altIn = _props$uiSchema.altInputSeparator,
altInputSeparator = _props$uiSchema$altIn === undefined ? "" : _props$uiSchema$altIn,
fields = props.registry.fields,
_props$idSchema = props.idSchema;
_props$idSchema = _props$idSchema === undefined ? {} : _props$idSchema;
var $id = _props$idSchema.$id;


var DefInput = fields[defInput];
var AltInput = fields[altInput];

var noBorder = {
border: "0",
boxShadow: "none"
};
return _react2.default.createElement(
"div",
{ className: "row", id: $id },
_react2.default.createElement(
"div",
{ className: "col-md-5" },
_react2.default.createElement(DefInput, props)
),
_react2.default.createElement(
"div",
{ className: "col-md-2 text-center" },
_react2.default.createElement(
"div",
{ className: "form-control", style: noBorder },
altInputSeparator
)
),
_react2.default.createElement(
"div",
{ className: "col-md-5" },
_react2.default.createElement(AltInput, props)
)
);
}

altInputField.propTypes = {
uiSchema: _propTypes2.default.shape({
defInput: _propTypes2.default.string.isRequired,
altInput: _propTypes2.default.string.isRequired,
altInputSeparator: _propTypes2.default.string
})
};

exports.default = altInputField;
Loading

0 comments on commit b162be5

Please sign in to comment.