Class: PhlexKit::DrawerTrigger

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

Overview

Opens the Drawer (wrap a Button). See drawer.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ DrawerTrigger

Returns a new instance of DrawerTrigger.



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

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

Instance Method Details

#view_templateObject



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

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