Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export default Ember.Component.extend({
classNameBindings: ['containerClass'],
containerClass: function() {
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
}.property('size'),
render: function(buffer) {
if (this.get('condition')) {
buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
} else {
return this._super();
}
},
_conditionChanged: function() {
this.rerender();
}.observes('condition')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.