0.0.0-alpha.0 • Published 12 months ago

unplugin-icons-literal v0.0.0-alpha.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

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 ......>`