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/forms / build / dist / src / new-forms / plugins / TextAreaPlugin.js
Size: Mime:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = require("react");
const mobx_react_1 = require("xmobx/mobx-react");
const validators_1 = require("../../validators");
let TextAreaPlugin = class TextAreaPlugin extends React.Component {
    static isSatisfiedByProps(props) {
        return ['textarea'].includes(props.type);
    }
    render() {
        const _a = this.props, { ref, className } = _a, props = tslib_1.__rest(_a, ["ref", "className"]);
        return React.createElement("textarea", Object.assign({ className: className }, props));
    }
};
TextAreaPlugin.defaultState = (inputState) => {
    return {
        validator: (value) => validators_1.isValid(value) || validators_1.errorMessageFor('required'),
    };
};
TextAreaPlugin = tslib_1.__decorate([
    mobx_react_1.observer
], TextAreaPlugin);
exports.TextAreaPlugin = TextAreaPlugin;
//# sourceMappingURL=TextAreaPlugin.js.map