Class: DsfrComponent::Base
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- DsfrComponent::Base
- Defined in:
- app/components/dsfr_component/base.rb
Direct Known Subclasses
AccordionComponent, AccordionComponent::SectionComponent, AlertComponent, BadgeComponent, BreadcrumbsComponent, ButtonComponent, CalloutComponent, HeaderComponent, HeaderComponent::DirectLinkComponent, HeaderComponent::DirectLinkDropdownComponent, HeaderComponent::OperatorImageComponent, HeaderComponent::ToolLinkComponent, HighlightComponent, ModalComponent, NoticeComponent, ProconnectButtonComponent, SearchComponent, SkiplinkComponent, StepperComponent, TabsComponent, TabsComponent::TabComponent, TagComponent, TileComponent
Constant Summary collapse
- HEADING_LEVELS =
[1, 2, 3, 4, 5, 6].freeze
- SIZES =
i[sm md lg].freeze
Instance Attribute Summary collapse
-
#html_attributes ⇒ Object
readonly
Returns the value of attribute html_attributes.
Instance Method Summary collapse
-
#initialize(html_attributes: {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(html_attributes: {}) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 18 |
# File 'app/components/dsfr_component/base.rb', line 12 def initialize(html_attributes: {}) @html_attributes = default_attributes .deep_merge_html_attributes(html_attributes) .deep_tidy_html_attributes super end |
Instance Attribute Details
#html_attributes ⇒ Object (readonly)
Returns the value of attribute html_attributes.
4 5 6 |
# File 'app/components/dsfr_component/base.rb', line 4 def html_attributes @html_attributes end |