mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
ES2015 first look / babeljs
This commit is contained in:
parent
5dcceaaca5
commit
445cd155e5
123 changed files with 3214 additions and 3680 deletions
31
dev/Component/Select.jsx
Normal file
31
dev/Component/Select.jsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
import Utils from 'Common/Utils';
|
||||
import Translator from 'Common/Translator';
|
||||
import {componentExportHelper} from 'Component/Abstract';
|
||||
import {AbstractInput} from 'Component/AbstractInput';
|
||||
|
||||
class SelectComponent extends AbstractInput
|
||||
{
|
||||
/**
|
||||
* @param {Object} params
|
||||
*/
|
||||
constructor(params) {
|
||||
|
||||
super(params);
|
||||
|
||||
this.options = params.options || '';
|
||||
|
||||
this.optionsText = params.optionsText || null;
|
||||
this.optionsValue = params.optionsValue || null;
|
||||
this.optionsCaption = params.optionsCaption || null;
|
||||
|
||||
if (this.optionsCaption)
|
||||
{
|
||||
this.optionsCaption = Translator.i18n(this.optionsCaption);
|
||||
}
|
||||
|
||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = componentExportHelper(SelectComponent, 'SelectComponent');
|
||||
Loading…
Add table
Add a link
Reference in a new issue