discourse/app/assets/javascripts/discourse-common/addon/helpers/d-icon.js
David Taylor eb94ec16da
DEV: introduce Ember <template> tag support (.gjs) (#22719)
The gjs/gts formats are a new pattern for authoring Ember components. This commit introduces support for these patterns to our build pipeline for core/plugins, and converts a handful of components to use the new format. It also introduces relevant updates to our linting config, and to our sample vscode configuration.

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>
2023-07-20 21:01:12 +01:00

10 lines
312 B
JavaScript

import { htmlSafe } from "@ember/template";
import { registerUnbound } from "discourse-common/lib/helpers";
import { renderIcon } from "discourse-common/lib/icon-library";
export default function icon(id, options = {}) {
return htmlSafe(renderIcon("string", id, options));
}
registerUnbound("d-icon", icon);