mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 13:05:50 +08:00
16 lines
388 B
JavaScript
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(' '));
|
|
}
|
|
}
|