Class: Spark::Nav::TabPanels

Inherits:
Tabs show all
Defined in:
app/components/spark/nav/tab_panels.rb

Constant Summary

Constants inherited from Tabs

Spark::Nav::Tabs::LAYOUT, Spark::Nav::Tabs::THEME

Instance Method Summary collapse

Methods inherited from Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeTabPanels

Returns a new instance of TabPanels.



25
26
27
28
# File 'app/components/spark/nav/tab_panels.rb', line 25

def initialize(*)
  super
  @nav_group_attrs.add(role: "tablist")
end

Instance Method Details

#active_item_textObject



30
31
32
# File 'app/components/spark/nav/tab_panels.rb', line 30

def active_item_text
  items.first.attribute(:text)
end