2018-06-15 17:03:24 +02:00
|
|
|
import deprecated from "discourse-common/lib/deprecated";
|
2020-04-30 16:41:02 -04:00
|
|
|
import { htmlSafe } from "@ember/template";
|
2020-12-01 15:31:26 -03:00
|
|
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
|
|
|
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) {
|
2018-06-15 17:03:24 +02:00
|
|
|
return renderIcon("string", id, params);
|
2015-01-14 15:01:41 -05:00
|
|
|
}
|
|
|
|
|
2020-09-04 13:42:47 +02:00
|
|
|
registerUnbound("fa-icon", function (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));
|
2014-09-09 17:29:05 -04:00
|
|
|
});
|