Class: FoxTail::ColorThemeTriggerComponent

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

Defined Under Namespace

Classes: StimulusController

Instance Attribute Summary

Attributes inherited from TriggerBaseComponent

#block, #selector

Attributes inherited from BaseComponent

#html_attributes

Class Method Summary collapse

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(html_attributes = {}) ⇒ ColorThemeTriggerComponent

Returns a new instance of ColorThemeTriggerComponent.



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

def initialize(html_attributes = {})
  super(html_attributes.delete(:id), nil, html_attributes)
end

Class Method Details

.stimulus_controller_nameObject



15
16
17
# File 'app/components/fox_tail/color_theme_trigger_component.rb', line 15

def stimulus_controller_name
  :color_theme
end

Instance Method Details

#stimulus_controller_optionsObject



10
11
12
# File 'app/components/fox_tail/color_theme_trigger_component.rb', line 10

def stimulus_controller_options
  super.merge action: action
end