mirror of
https://github.com/discourse/discourse.git
synced 2024-12-28 14:48:45 +08:00
17 lines
542 B
JavaScript
17 lines
542 B
JavaScript
import { htmlSafe } from "@ember/template";
|
|
import deprecated from "discourse-common/lib/deprecated";
|
|
import { registerRawHelper } from "discourse-common/lib/helpers";
|
|
import { renderIcon } from "discourse-common/lib/icon-library";
|
|
|
|
export function iconHTML(id, params) {
|
|
return renderIcon("string", id, params);
|
|
}
|
|
|
|
registerRawHelper("fa-icon", faIcon);
|
|
export default function faIcon(icon, params) {
|
|
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}", {
|
|
id: "discourse.fa-icon",
|
|
});
|
|
return htmlSafe(iconHTML(icon, params));
|
|
}
|