loading-spinner.es6 420 B

123456789101112131415
  1. import { htmlHelper } from 'discourse-common/lib/helpers';
  2. function renderSpinner(cssClass) {
  3. var html = "<div class='spinner";
  4. if (cssClass) { html += ' ' + cssClass; }
  5. return html + "'></div>";
  6. }
  7. var spinnerHTML = renderSpinner();
  8. export default htmlHelper(params => {
  9. const hash = params.hash;
  10. return renderSpinner((hash && hash.size) ? hash.size : undefined);
  11. });
  12. export { spinnerHTML, renderSpinner };