Class: FoxTail::PopoverTriggerComponent

Inherits:
TriggerBaseComponent show all
Defined in:
app/components/fox_tail/popover_trigger_component.rb

Defined Under Namespace

Classes: StimulusController

Instance Attribute Summary

Attributes inherited from TriggerBaseComponent

#block, #selector

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from TriggerBaseComponent

#before_render, #block?, #call, #render?

Methods inherited from BaseComponent

classname_merger, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

#initialize(id_or_selector, selector_or_attributes = {}, html_attributes = {}) ⇒ PopoverTriggerComponent

Returns a new instance of PopoverTriggerComponent.



6
7
8
9
# File 'app/components/fox_tail/popover_trigger_component.rb', line 6

def initialize(id_or_selector, selector_or_attributes = {}, html_attributes = {})
  super
  options[:trigger_type] = :hover unless trigger_type?
end

Instance Method Details

#stimulus_controller_optionsObject



11
12
13
# File 'app/components/fox_tail/popover_trigger_component.rb', line 11

def stimulus_controller_options
  super.merge delay: delay
end