1
0
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:
zafer 2024-05-22 13:47:32 +03:00
parent 8d025ce8df
commit 5edb301560

View File

@ -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"