snappymail/dev/Component/TextArea.jsx

24 lines
525 B
React
Raw Normal View History

2015-11-15 08:23:16 +08:00
2016-06-07 05:57:52 +08:00
import {isUnd} from 'Common/Utils';
2015-11-15 08:23:16 +08:00
import {componentExportHelper} from 'Component/Abstract';
import {AbstractInput} from 'Component/AbstractInput';
2016-07-06 03:52:52 +08:00
const DEFAULT_ROWS = 5;
2015-11-15 08:23:16 +08:00
class TextAreaComponent extends AbstractInput
{
/**
2016-06-30 08:02:45 +08:00
* @constructor
2015-11-15 08:23:16 +08:00
* @param {Object} params
*/
constructor(params) {
super(params);
2016-07-06 03:52:52 +08:00
this.rows = params.rows || DEFAULT_ROWS;
2016-06-07 05:57:52 +08:00
this.spellcheck = isUnd(params.spellcheck) ? false : !!params.spellcheck;
2015-11-15 08:23:16 +08:00
}
}
module.exports = componentExportHelper(TextAreaComponent, 'TextAreaComponent');