Repository URL to install this package:
|
Version:
3.0.6-working.1 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const utils_1 = require("@skava/utils");
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 utils_1.omit(props, fixture_1.omitKeys);
}
exports.toPassThrough = toPassThrough;
function toAttributes(props) {
const remaining = toPassThrough(props);
const placeholder = toPlaceholder(props);
const Wrapper = toWrap(props);
return Object.assign({}, remaining, {
Wrapper,
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