yes-no-switch.js 375 B

1234567891011121314151617
  1. import Ember from 'ember';
  2. export default Ember.Component.extend({
  3. tagName: 'button',
  4. attributeBindings: ['type'],
  5. type: 'button',
  6. classNames: ['btn', 'btn-outlined', 'btn-yes-no-switch'],
  7. classNameBindings: ['value:btn-success:btn-default'],
  8. yesLabel: gettext('Yes'),
  9. noLabel: gettext('No'),
  10. click: function() {
  11. this.toggleProperty('value');
  12. }
  13. });