Class: DsfrComponent::TabsComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/dsfr_component/tabs_component.rb

Defined Under Namespace

Classes: TabComponent

Constant Summary

Constants inherited from Base

Base::HEADING_LEVELS

Instance Attribute Summary

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Constructor Details

#initialize(label: nil, classes: [], html_attributes: {}) ⇒ TabsComponent

Returns a new instance of TabsComponent.

Parameters:

  • label (String) (defaults to: nil)

    Le nom du système d’onglets, sera uniquement affiché comme aria-label (optionnel)



5
6
7
8
9
10
# File 'app/components/dsfr_component/tabs_component.rb', line 5

def initialize(label: nil, classes: [], html_attributes: {})
  @label = label
  @tabs = []

  super(classes: classes, html_attributes: html_attributes)
end