defmodule Liliform.Media do
use Liliform.Component
@doc """
Renders a media object.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def media(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
<%= render_slot(@inner_block) %>
"""
end
@doc """
Renders a media-left.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def media_left(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
"""
end
@doc """
Renders a media-content.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def media_content(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
<%= render_slot(@inner_block) %>
"""
end
@doc """
Renders a media-right.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def media_right(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
<%= render_slot(@inner_block) %>
"""
end
end