0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 05:52:52 +01:00
discourse-custom-wizard/assets/javascripts/wizard/helpers/loading-spinner.es6

18 Zeilen
426 B
Text

import { htmlHelper } from "discourse-common/lib/helpers";
2017-10-09 07:52:09 +02:00
function renderSpinner(cssClass) {
var html = "<div class='spinner";
if (cssClass) {
html += " " + cssClass;
}
2017-10-09 07:52:09 +02:00
return html + "'></div>";
}
var spinnerHTML = renderSpinner();
export default htmlHelper((params) => {
2017-10-09 07:52:09 +02:00
const hash = params.hash;
return renderSpinner(hash && hash.size ? hash.size : undefined);
2017-10-09 07:52:09 +02:00
});
export { spinnerHTML, renderSpinner };