Class: PhlexKit::DrawerClose

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/drawer/drawer_close.rb

Overview

Closes the drawer from inside the cloned panel (wrap a Button). See drawer.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ DrawerClose

Returns a new instance of DrawerClose.



4
# File 'app/components/phlex_kit/drawer/drawer_close.rb', line 4

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

Instance Method Details

#view_templateObject



5
6
7
# File 'app/components/phlex_kit/drawer/drawer_close.rb', line 5

def view_template(&)
  div(**mix({ class: "pk-drawer-close", data: { action: "click->phlex-kit--sheet-content#close" } }, @attrs), &)
end