Class: PhlexKit::SidebarInput

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

Overview

Search/filter input for the sidebar, ported from shadcn/ui's SidebarInput: the kit Input on the page background, sized to the sidebar's control height. See sidebar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ SidebarInput

Returns a new instance of SidebarInput.



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

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

Instance Method Details

#view_templateObject



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

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