24 lines
429 B
Elixir
24 lines
429 B
Elixir
|
defmodule Liliform.Hero do
|
||
|
use Liliform.Component
|
||
|
|
||
|
@doc """
|
||
|
Renders a hero section.
|
||
|
"""
|
||
|
attr :class, :string, default: "", doc: "additional classes"
|
||
|
attr :rest, :global
|
||
|
|
||
|
slot :inner_block, required: true
|
||
|
|
||
|
def hero(assigns) do
|
||
|
assigns =
|
||
|
assigns
|
||
|
|> set_bulma_classes()
|
||
|
|
||
|
~H"""
|
||
|
<section class={["hero", @class]} {@rest}>
|
||
|
<%= render_slot(@inner_block) %>
|
||
|
</section>
|
||
|
"""
|
||
|
end
|
||
|
end
|