Pregenerate the icons with a mix task

This commit is contained in:
Max Veytsman
2022-08-31 16:41:05 -04:00
parent 9c6dafbd81
commit 093383a73a
12 changed files with 35681 additions and 197 deletions

View File

@ -16,71 +16,4 @@ defmodule Heroicons do
Heroicons are designed by [Steve Schoger](https://twitter.com/steveschoger)
"""
defmodule Outline do
@moduledoc """
Outline style icons drawn with a stroke, packaged as Phoenix Components.
For primary navigation and marketing sections, with an outlined appearance,
designed to be rendered at 24x24.
"""
use Heroicons.Generator,
icon_dir: "outline/",
# Following https://github.com/tailwindlabs/heroicons/blob/b933d51df1f27c35414389fea185e9bac0097481/svgo.24.outline.yaml
svg_opts: [
remove_dimensions: true,
sort_attributes: true,
remove_attributes: ["stroke", "path:stroke-width"],
add_attributes: [
{"stroke-widt", "1.5"},
{"stroke", "currentColor"},
{"aria-hidden", "true"}
]
]
end
defmodule Solid do
@moduledoc """
Solid style icons drawn with fills, packaged as Phoenix Components.
For primary navigation and marketing sections, with a filled appearance,
designed to be rendered at 24x24.
"""
use Heroicons.Generator,
icon_dir: "solid/",
# Following https://github.com/tailwindlabs/heroicons/blob/b933d51df1f27c35414389fea185e9bac0097481/svgo.24.solid.yaml
svg_opts: [
remove_dimensions: true,
sort_attributes: true,
remove_attributes: ["fill"],
add_attributes: [
{"fill", "currentColor"},
{"aria-hidden", "true"}
]
]
end
defmodule Mini do
@moduledoc """
Solid style icons drawn with fills, packaged as Phoenix Components.
For smaller elements like buttons, form elements, and to support text,
designed to be rendered at 20x20.
"""
use Heroicons.Generator,
icon_dir: "mini/",
# Following https://github.com/tailwindlabs/heroicons/blob/b933d51df1f27c35414389fea185e9bac0097481/svgo.20.solid.yaml
svg_opts: [
remove_dimensions: true,
sort_attributes: true,
remove_attributes: ["fill"],
add_attributes: [
{"fill", "currentColor"},
{"aria-hidden", "true"}
]
]
end
end