discourse/app/assets/javascripts/admin/helpers/check-icon.js
2020-09-04 13:42:47 +02:00

9 lines
313 B
JavaScript

import { registerUnbound } from "discourse-common/lib/helpers";
import { renderIcon } from "discourse-common/lib/icon-library";
import { htmlSafe } from "@ember/template";
registerUnbound("check-icon", function (value) {
let icon = value ? "check" : "times";
return htmlSafe(renderIcon("string", icon));
});