2020-05-01 04:41:02 +08:00
|
|
|
import { htmlSafe } from "@ember/template";
|
2023-10-11 02:38:59 +08:00
|
|
|
import deprecated from "discourse-common/lib/deprecated";
|
2023-10-19 21:28:25 +08:00
|
|
|
import { registerRawHelper } from "discourse-common/lib/helpers";
|
2017-07-27 00:13:49 +08:00
|
|
|
import { renderIcon } from "discourse-common/lib/icon-library";
|
2015-01-29 00:01:01 +08:00
|
|
|
|
2017-07-27 00:13:49 +08:00
|
|
|
export function iconHTML(id, params) {
|
|
|
|
return renderIcon("string", id, params);
|
2015-01-15 04:01:41 +08:00
|
|
|
}
|
|
|
|
|
2023-10-19 21:28:25 +08:00
|
|
|
registerRawHelper("fa-icon", faIcon);
|
|
|
|
export default function faIcon(icon, params) {
|
2024-07-15 14:29:17 +08:00
|
|
|
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}", {
|
|
|
|
id: "discourse.fa-icon",
|
|
|
|
});
|
2020-05-01 04:41:02 +08:00
|
|
|
return htmlSafe(iconHTML(icon, params));
|
2023-10-19 21:28:25 +08:00
|
|
|
}
|