framework/js/lib/components/loading-indicator.js
2015-04-25 22:28:39 +09:30

16 lines
388 B
JavaScript

import Component from 'flarum/component';
export default class LoadingIndicator extends Component {
view() {
var size = this.props.size || 'small';
delete this.props.size;
this.props.config = function(element) {
$.fn.spin.presets[size].zIndex = 'auto';
$(element).spin(size);
};
return m('div.loading-indicator', this.props, m.trust(' '));
}
}