HOT-FIX. Добавлены методы создания компонентов и нод внутри компонентов

This commit is contained in:
2020-08-08 21:56:43 +03:00
parent aeb16d45e5
commit 5b9c6a8f94
28 changed files with 99 additions and 73 deletions

View File

@ -1,5 +1,4 @@
import Component from '../component';
import {createElement} from '../../utils/elementUtils';
import {FORM_TYPES} from '../../consts';
class FormControl extends Component {
@ -16,7 +15,7 @@ class FormControl extends Component {
this.label = this.mainNode.querySelector('.form-label');
this.errorText = this.mainNode.querySelector('.form-text');
this.input = createElement({
this.input = this.createElement({
tagName: this.getInputTagName(type),
options: {
className: `form-control ${className}`,