Class: Irelia::Dropdown::Component::DropdownTrigger

Inherits:
Button::Component
  • Object
show all
Defined in:
app/components/irelia/dropdown/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ DropdownTrigger

Returns a new instance of DropdownTrigger.



25
26
27
28
29
# File 'app/components/irelia/dropdown/component.rb', line 25

def initialize(**options)
  options[:html_options] ||= {}
  options[:html_options]["data"] = { "action": "irelia-dropdown#toggle click@window->irelia-dropdown#hide" }
  super(**options)
end