defmodule DaisyUIComponents.Breadcrumbs do @moduledoc """ Stat component https://daisyui.com/components/stat """ use DaisyUIComponents, :component import DaisyUIComponents.Icon attr :class, :any, default: nil attr :rest, :global slot :item do attr :icon, :string attr :path, :string end slot :inner_block def breadcrumbs(assigns) do ~H"""
""" end defp render_link(%{path: nil} = assigns) do ~H""" {render_slot(@inner_block)} """ end defp render_link(assigns) do ~H""" <.link :if={@path} navigate={@path}> {render_slot(@inner_block)} """ end defp render_icon(assigns) do ~H""" <.icon :if={@icon} name={@icon} class="w-4 h-4 mr-2" /> """ end end