Class: PhlexKit::SidebarSeparator

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/sidebar/sidebar_separator.rb

Overview

Divider between sidebar sections, ported from shadcn/ui's SidebarSeparator: the kit Separator inset to the sidebar's padding and tinted with the sidebar border role. See sidebar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ SidebarSeparator

Returns a new instance of SidebarSeparator.



6
7
8
# File 'app/components/phlex_kit/sidebar/sidebar_separator.rb', line 6

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

Instance Method Details

#view_templateObject



10
11
12
# File 'app/components/phlex_kit/sidebar/sidebar_separator.rb', line 10

def view_template
  render Separator.new(**mix({ class: "pk-sidebar-separator" }, @attrs))
end