2017-07-26 16:25:09 -04:00
|
|
|
import deprecated from "discourse-common/lib/deprecated";
|
2020-04-30 16:41:02 -04:00
|
|
|
import { htmlSafe } from "@ember/template";
|
2016-08-31 11:30:51 -04:00
|
|
|
import { registerUnbound } 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
|
|
|
}
|
|
|
|
|
2015-01-28 11:01:01 -05: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
|
|
|
});
|