2016-08-31 23:30:51 +08:00
|
|
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
2017-07-27 00:13:49 +08:00
|
|
|
import { renderIcon } from "discourse-common/lib/icon-library";
|
2017-07-27 04:25:09 +08:00
|
|
|
import deprecated from "discourse-common/lib/deprecated";
|
2020-05-01 04:41:02 +08:00
|
|
|
import { htmlSafe } from "@ember/template";
|
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
|
|
|
}
|
|
|
|
|
2015-01-29 00:01:01 +08:00
|
|
|
registerUnbound("fa-icon", function (icon, params) {
|
2017-07-27 04:25:09 +08:00
|
|
|
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}");
|
2020-05-01 04:41:02 +08:00
|
|
|
return htmlSafe(iconHTML(icon, params));
|
2014-09-10 05:29:05 +08:00
|
|
|
});
|