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