Class: PhlexKit::BreadcrumbEllipsis

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/breadcrumb/breadcrumb_ellipsis.rb

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ BreadcrumbEllipsis

Returns a new instance of BreadcrumbEllipsis.



3
# File 'app/components/phlex_kit/breadcrumb/breadcrumb_ellipsis.rb', line 3

def initialize(**attrs) = (@attrs = attrs)

Instance Method Details

#view_templateObject



4
5
6
7
8
9
10
11
# File 'app/components/phlex_kit/breadcrumb/breadcrumb_ellipsis.rb', line 4

def view_template
  # No aria-hidden on the wrapper — it would swallow the sr-only text.
  # The Icon renders its own aria-hidden="true"; only the glyph is hidden.
  span(**mix({ class: "pk-breadcrumb-ellipsis", role: "presentation" }, @attrs)) do
    render Icon.new(:ellipsis, size: nil)
    span(class: "pk-sr-only") { "More" }
  end
end