Class: UI::DrawerHeaderComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DrawerHeaderComponent
- Includes:
- DrawerHeaderBehavior
- Defined in:
- app/view_components/ui/drawer_header_component.rb
Overview
Drawer header component (ViewComponent) Header section for drawer
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", attributes: {}) ⇒ DrawerHeaderComponent
constructor
A new instance of DrawerHeaderComponent.
Methods included from DrawerHeaderBehavior
#drawer_header_base_classes, #drawer_header_classes, #drawer_header_html_attributes
Constructor Details
#initialize(classes: "", attributes: {}) ⇒ DrawerHeaderComponent
Returns a new instance of DrawerHeaderComponent.
16 17 18 19 |
# File 'app/view_components/ui/drawer_header_component.rb', line 16 def initialize(classes: "", attributes: {}) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'app/view_components/ui/drawer_header_component.rb', line 21 def call content_tag :div, content, **drawer_header_html_attributes.merge(@attributes) end |