Class: FoxTail::Tabs::TabComponent::StimulusController

Inherits:
StimulusController
  • Object
show all
Defined in:
app/components/fox_tail/tabs/tab_component.rb

Instance Method Summary collapse

Instance Method Details

#attributes(options = {}) ⇒ Object



111
112
113
114
115
116
117
118
119
120
# File 'app/components/fox_tail/tabs/tab_component.rb', line 111

def attributes(options = {})
  attributes = super
  attributes[:data][value_key(:selected)] = options[:selected]
  attributes[:data][classes_key(:active)] = options[:active_classes]
  attributes[:data][classes_key(:selected)] = options[:selected_classes]
  attributes[:data][outlet_key("fox_tail--tab")] = options[:siblings]
  attributes[:data][outlet_key("fox_tail--collapsible")] = options[:panel]
  attributes[:data][:action] = action(:select)
  attributes
end