discourse/app/assets/javascripts/discourse-common/helpers/fa-icon.js

Failed to ignore revisions in .git-blame-ignore-revs.

13 lines
446 B
JavaScript
Raw Normal View History

2018-06-15 23:03:24 +08:00
import { registerUnbound } from "discourse-common/lib/helpers";
import { renderIcon } from "discourse-common/lib/icon-library";
import deprecated from "discourse-common/lib/deprecated";
export function iconHTML(id, params) {
2018-06-15 23:03:24 +08:00
return renderIcon("string", id, params);
}
2018-06-15 23:03:24 +08:00
registerUnbound("fa-icon", function(icon, params) {
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}");
return new Handlebars.SafeString(iconHTML(icon, params));
});