Class: PhlexKit::SidebarInset
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::SidebarInset
- Defined in:
- app/components/phlex_kit/sidebar/sidebar_inset.rb
Overview
The main content region beside a PhlexKit::Sidebar (renders class: "main" to keep the app's existing content padding/typography.
See sidebar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ SidebarInset
constructor
A new instance of SidebarInset.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
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 |