defmodule Liliform.Title do
use Liliform.Component
@doc """
Renders a title.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def title(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
<%= render_slot(@inner_block) %>
"""
end
@doc """
Renders a subtitle.
"""
attr :class, :string, default: "", doc: "additional classes"
attr :rest, :global
slot :inner_block, required: true
def subtitle(assigns) do
assigns =
assigns
|> set_bulma_classes()
~H"""
<%= render_slot(@inner_block) %>
"""
end
end