Add filters

This commit is contained in:
Harshad Sharma 2024-05-16 05:57:59 +05:30
parent a05f289b5e
commit 09213f5294
2 changed files with 8 additions and 6 deletions

View file

@ -3,11 +3,9 @@ defmodule FreediveWeb.ServiceLive do
def render(assigns) do
~H"""
<.block class="px-2 py-4">
<.page name="Services" filters={@filters}>
<FreediveWeb.ServiceLive.Item.items_block items={@items} />
</.page>
</.block>
<.page name="Services" filters={@filters}>
<FreediveWeb.ServiceLive.Item.items_block items={@items} />
</.page>
"""
end
@ -78,7 +76,7 @@ defmodule FreediveWeb.ServiceLive.Item do
import Liliform.Icon
@doc """
Returns a list of items.
Returns items as panel-blocks.
"""
attr :items, :list, default: [], doc: "items"

View file

@ -1,5 +1,6 @@
defmodule Liliform.Page do
use Liliform.Component
import Liliform.Block
import Liliform.Icon
import Liliform.Panel
import Liliform.Control
@ -21,6 +22,8 @@ defmodule Liliform.Page do
|> set_bulma_classes()
~H"""
<.block class="px-2 py-4">
<.panel class={@class} {@rest} is-info>
<.panel_heading>
<%= @name %>
@ -66,6 +69,7 @@ defmodule Liliform.Page do
</.panel_block>
<%= render_slot(@inner_block) %>
</.panel>
</.block>
"""
end
end