Class: Irelia::Dropdown::Component::CustomDropdownTrigger
- Inherits:
-
Component
- Object
- ViewComponentContrib::Base
- Component
- Irelia::Dropdown::Component::CustomDropdownTrigger
- Defined in:
- app/components/irelia/dropdown/component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**options) ⇒ CustomDropdownTrigger
constructor
A new instance of CustomDropdownTrigger.
Methods inherited from Component
#add_css_classes, after_initialize, #html_options, inherited, run_after_initialize_hooks, #variants
Constructor Details
#initialize(**options) ⇒ CustomDropdownTrigger
Returns a new instance of CustomDropdownTrigger.
33 34 35 36 37 38 |
# File 'app/components/irelia/dropdown/component.rb', line 33 def initialize(**) [:html_options] ||= {} [:html_options]["data"] = { "action": "irelia-dropdown#toggle click@window->irelia-dropdown#hide" } [:html_options]["style"] = "display:block;width:100%" super(**) end |
Instance Method Details
#call ⇒ Object
40 41 42 |
# File 'app/components/irelia/dropdown/component.rb', line 40 def call content_tag(:button, content, ) end |