Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / inputs / TextArea / deps.js
Size: Mime:
"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 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