Packages
primer_live
0.1.13
An implementation of GitHub's Primer Design System for Phoenix LiveView.
Current section
Files
Jump to
Current section
Files
priv/octicon_builder/PrimerLive.Octicons.template.eex
defmodule PrimerLive.Octicons do
use Phoenix.Component
# Generated by PrimerLive.Helpers.Octicons
@doc """
Internal use: generates a map of SVG's.
To use the `PrimerLive.Component.octicon/1` component, write:
```
<.octicon name="icon-name" />
```
## All octicons
```
<%= for %{name: name} <- icons do %><.octicon name="<%= name %>" />
<% end %>```
"""
def octicons(assigns) do
%{
<%= for %{name: name, svg: svg} <- icons do %>
"<%= name %>" => ~H"""
<%= svg %>
""",<% end %>
}
end
end