forked from hiway/freedive
23 lines
425 B
Elixir
23 lines
425 B
Elixir
defmodule Liliform.Content do
|
|
use Liliform.Component
|
|
|
|
@doc """
|
|
Renders a content.
|
|
"""
|
|
attr :class, :string, default: "", doc: "additional classes"
|
|
attr :rest, :global
|
|
|
|
slot :inner_block, required: true
|
|
|
|
def content(assigns) do
|
|
assigns =
|
|
assigns
|
|
|> set_bulma_classes()
|
|
|
|
~H"""
|
|
<div class={["content", @class]} {@rest}>
|
|
<%= render_slot(@inner_block) %>
|
|
</div>
|
|
"""
|
|
end
|
|
end
|