2018-06-15 23:03:24 +08:00
|
|
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
|
|
|
import { renderIcon } from "discourse-common/lib/icon-library";
|
|
|
|
import deprecated from "discourse-common/lib/deprecated";
|
2015-01-29 00:01:01 +08:00
|
|
|
|
2017-07-27 00:13:49 +08:00
|
|
|
export function iconHTML(id, params) {
|
2018-06-15 23:03:24 +08:00
|
|
|
return renderIcon("string", id, params);
|
2015-01-15 04:01:41 +08:00
|
|
|
}
|
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
registerUnbound("fa-icon", function(icon, params) {
|
2017-07-27 04:25:09 +08:00
|
|
|
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}");
|
2015-02-25 02:47:46 +08:00
|
|
|
return new Handlebars.SafeString(iconHTML(icon, params));
|
2014-09-10 05:29:05 +08:00
|
|
|
});
|