Repository URL to install this package:
|
Version:
3.1.2 ▾
|
"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