Class: DsfrComponent::AccordionComponent

Inherits:
Base
  • Object
show all
Includes:
Traits::HeaderSizeable
Defined in:
app/components/dsfr_component/accordion_component.rb

Defined Under Namespace

Classes: SectionComponent

Constant Summary

Constants included from Traits::HeaderSizeable

Traits::HeaderSizeable::DEFAULT_HEADER_LEVEL

Constants inherited from Base

Base::HEADING_LEVELS, Base::SIZES

Instance Attribute Summary

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Methods included from Traits::HeaderSizeable

#default_header_level, #header_level, #header_level=, #header_tag

Constructor Details

#initialize(html_attributes: {}, header_level: nil) ⇒ AccordionComponent

Returns a new instance of AccordionComponent.



15
16
17
18
19
# File 'app/components/dsfr_component/accordion_component.rb', line 15

def initialize(html_attributes: {}, header_level: nil)
  self.header_level = header_level

  super(html_attributes: html_attributes)
end