Browse Source

Update button trait

refactor-traits
Artur Arseniev 7 years ago
parent
commit
767d641eae
  1. 20
      src/trait_manager/view/TraitButtonView.js

20
src/trait_manager/view/TraitButtonView.js

@ -28,17 +28,13 @@ export default TraitView.extend({
}, },
getInputEl() { getInputEl() {
if (!this.input) { const { model, ppfx } = this;
const { model, ppfx } = this; const label = model.get('labelButton') || '';
const label = model.get('labelButton') || ''; const full = model.get('full');
const full = model.get('full'); const className = `${ppfx}btn`;
const className = `${ppfx}btn`; const input = `<button type="button" class="${className}-prim${
const input = `<button type="button" class="${className}-prim${ full ? ` ${className}--full` : ''
full ? ` ${className}--full` : '' }">${label}</button>`;
}">${label}</button>`; return input;
this.input = input;
}
return this.input;
} }
}); });

Loading…
Cancel
Save