Class: PhlexKit::BreadcrumbSeparator

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

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ BreadcrumbSeparator

Returns a new instance of BreadcrumbSeparator.



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

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

Instance Method Details

#view_template(&block) ⇒ Object



4
5
6
7
8
# File 'app/components/phlex_kit/breadcrumb/breadcrumb_separator.rb', line 4

def view_template(&block)
  li(**mix({ class: "pk-breadcrumb-separator", role: "presentation", aria: { hidden: true } }, @attrs)) do
    if block then yield else render(Icon.new(:chevron_right, size: nil)) end
  end
end