Artur Arseniev
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
src/dom_components/model/Component.js
|
|
|
@ -757,12 +757,12 @@ const Component = Backbone.Model.extend(Styleable).extend( |
|
|
|
* @param {Options} opts Options for the add |
|
|
|
* @return {Array} Array of added traits |
|
|
|
* @example |
|
|
|
* component.addTrat('title', { at: 1 }); // Add title trait (`at` option is the position index)
|
|
|
|
* component.addTrat({ |
|
|
|
* component.addTrait('title', { at: 1 }); // Add title trait (`at` option is the position index)
|
|
|
|
* component.addTrait({ |
|
|
|
* type: 'checkbox', |
|
|
|
* name: 'disabled', |
|
|
|
* }); |
|
|
|
* component.addTrat(['title', {...}, ...]); |
|
|
|
* component.addTrait(['title', {...}, ...]); |
|
|
|
*/ |
|
|
|
addTrait(trait, opts = {}) { |
|
|
|
const { em } = this; |
|
|
|
|