Class: Spark::Nav::Tabs

Inherits:
Component::Base show all
Defined in:
app/components/spark/nav/tabs.rb

Direct Known Subclasses

TabPanels

Constant Summary collapse

LAYOUT =
%i[flush padded]
THEME =
%i[tabs pills]

Instance Method Summary collapse

Methods inherited from Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeTabs

Returns a new instance of Tabs.



18
19
20
21
22
23
24
25
# File 'app/components/spark/nav/tabs.rb', line 18

def initialize(*)
  super

  classname.base = "spark-nav-#{@theme}"
  classname.add %(layout-#{@layout})
  data.add nav_id: unique_id
  @nav_group_attrs = TagAttr.new
end