SvgIcons (svg_icons v0.2.4) View Source

This module is used to handle creating modules for SVG icons. This allows using inline svgs without having to maintain the svgs inline.

Examples: defmodule HeroIcons do

use SvgIcons,
  surface: false,
  path: ["support/test-icons/optimized", {:variant, [:outline, :solid], "outline"}, :icon]

end

...

HeroIcons.svg({"outline", "chart-pie"}, class: "w-4 h-4")

Link to this section Summary

Link to this section Functions

Link to this function

collect_pattern_parts(path_parts)

View Source
Link to this function

define_surface_macro(caller)

View Source
Link to this function

expand(module, svgs, attributes, meta, path_pattern)

View Source
Link to this macro

read_svgs(base_dir, pattern_parts, extension, path_sep)

View Source (macro)
Link to this function

read_svgs(module, base_dir, pattern_parts, extension, path_sep)

View Source
Link to this function

render_svg(svgs, id, attrs)

View Source