Class: FoxTail::ModalComponent::StimulusController

Inherits:
StimulusController show all
Defined in:
app/components/fox_tail/modal_component.rb

Instance Attribute Summary

Attributes inherited from StimulusController

#identifier

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



128
129
130
131
132
133
134
135
136
# File 'app/components/fox_tail/modal_component.rb', line 128

def attributes(options = {})
  attributes = super
  attributes[:data][value_key(:static)] = options[:static]
  attributes[:data][value_key(:closeable)] = options[:closeable]
  attributes[:data][value_key(:open)] = options[:open]
  attributes[:data][classes_key(:visible)] = options[:visible_classes]
  attributes[:data][classes_key(:hidden)] = options[:hidden_classes]
  attributes
end