Class: FoxTail::ModalTriggerComponent::StimulusController
- Inherits:
-
StimulusController
- Object
- StimulusController
- FoxTail::ModalTriggerComponent::StimulusController
- Defined in:
- app/components/fox_tail/modal_trigger_component.rb
Instance Attribute Summary
Attributes inherited from StimulusController
Instance Method Summary collapse
Methods inherited from StimulusController
#action, #action_param_key, #build_actions, #classes_key, #config, #event, #initialize, #merge, #merge!, #outlet_key, #target_key, #to_s, #to_sym, #value_key
Constructor Details
This class inherits a constructor from FoxTail::StimulusController
Instance Method Details
#attributes(options = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'app/components/fox_tail/modal_trigger_component.rb', line 9 def attributes( = {}) attributes = super attributes[:data][outlet_key(modal_identifier)] = [:selector] attributes[:data][:action] = action .fetch(:action, :show), event: .fetch(:trigger_type, :click) attributes end |
#modal_identifier ⇒ Object
5 6 7 |
# File 'app/components/fox_tail/modal_trigger_component.rb', line 5 def modal_identifier FoxTail::ModalComponent.stimulus_controller_identifier end |