Class: PhlexKit::SidebarInset

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

Overview

The main content region beside a PhlexKit::Sidebar (renders

, flex-1). Pass class: "main" to keep the app's existing content padding/typography. See sidebar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ SidebarInset

Returns a new instance of SidebarInset.



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

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

Instance Method Details

#view_template(&block) ⇒ Object



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

def view_template(&block)
  main(**mix({ class: "pk-sidebar-inset" }, @attrs), &block)
end