mirror of
https://github.com/algora-io/tv.git
synced 2024-11-26 01:00:20 +02:00
add util component
This commit is contained in:
parent
8d025ce8df
commit
5edb301560
@ -20,7 +20,16 @@ defmodule AlgoraWeb.RTMPDestinationIconComponent do
|
||||
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<%= case get_icon(@url) do %>
|
||||
<.icon icon={get_icon(@url)} class={@class} />
|
||||
"""
|
||||
end
|
||||
|
||||
attr :icon, :atom
|
||||
attr :class, :string, default: nil
|
||||
|
||||
def icon(assigns) do
|
||||
~H"""
|
||||
<%= case @icon do %>
|
||||
<% :twitch -> %>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
Loading…
Reference in New Issue
Block a user