Class: UI::DrawerTitleComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DrawerTitleComponent
- Includes:
- DrawerTitleBehavior
- Defined in:
- app/view_components/ui/drawer_title_component.rb
Overview
Drawer title component (ViewComponent) ARIA-compliant heading for drawer
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", attributes: {}) ⇒ DrawerTitleComponent
constructor
A new instance of DrawerTitleComponent.
Methods included from DrawerTitleBehavior
#drawer_title_base_classes, #drawer_title_classes, #drawer_title_html_attributes
Constructor Details
#initialize(classes: "", attributes: {}) ⇒ DrawerTitleComponent
Returns a new instance of DrawerTitleComponent.
13 14 15 16 |
# File 'app/view_components/ui/drawer_title_component.rb', line 13 def initialize(classes: "", attributes: {}) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'app/view_components/ui/drawer_title_component.rb', line 18 def call content_tag :div, content, **drawer_title_html_attributes.merge(@attributes) end |