Repository URL to install this package:
|
Version:
0.9.5 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const omit_1 = require("@skava/modules/___dist/utils/omit");
const fixture_1 = require("./fixture");
const styled_1 = require("./styled");
function toPlaceholder(props) {
return props.placeholder || props.placeHolder;
}
exports.toPlaceholder = toPlaceholder;
function toPassThrough(props) {
return omit_1.omit(props, fixture_1.omitKeys);
}
exports.toPassThrough = toPassThrough;
function toAttributes(props) {
const remaining = toPassThrough(props);
const placeholder = toPlaceholder(props);
const Wrap = toWrap(props);
return Object.assign({}, remaining, { Wrap,
placeholder });
}
exports.toAttributes = toAttributes;
// @todo renderWrap too or render for textarea
function toWrap(props) {
return props.nowrap === true ? react_1.default.Fragment : styled_1.TextAreaWrap;
}
exports.toWrap = toWrap;
//# sourceMappingURL=deps.js.map