mirror of
https://github.com/algora-io/tv.git
synced 2025-04-17 06:57:04 +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
|
def render(assigns) do
|
||||||
~H"""
|
~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 -> %>
|
<% :twitch -> %>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user