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