unplugin-icons-literal
v0.0.0-alpha.0
Published
Wrapping icons with template literals
Downloads
7
Maintainers
Readme
unplugin-icons-literal
Wrapping icons with template literals.
Example
Import html from lit (import { html } from "lit"
) and convert svg to TemplateResult.
import iconsLiteral from "unplugin-icons-literal";
import Icons from "unplugin-icons";
Icons({
autoInstall: true,
compiler: iconsLiteral({
literal: "html",
module: "lit",
importDefault: false,
exportDefault: true,
}),
});
Icon will be converted to TemplateResult.
import icon from "~icons/ion/logo-web-component";
// icon is html`<svg ......>`