defmodule HomeDashWeb.BrewDashCommon do use Phoenix.Component attr :align, :atom, default: :right, required: false attr :class, :string, default: nil slot(:inner_block, required: true) def floating_pill(assigns) do assigns = assign_new(assigns, :position, fn assigns -> case assigns.align do :left -> "left-4" _ -> "right-4" end end) ~H"""
<%= render_slot(@inner_block) %>
""" end attr :tip, :string, required: true slot(:inner_block, required: true) def tool_tip(assigns) do ~H"""
<%= render_slot(@inner_block) %>
""" end attr :tip, :string, required: true attr :class, :string, default: nil def icon_gf(assigns) do ~H""" """ end end