Class: UI::DrawerDescriptionComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DrawerDescriptionComponent
- Includes:
- DrawerDescriptionBehavior
- Defined in:
- app/view_components/ui/drawer_description_component.rb
Overview
Drawer description component (ViewComponent) ARIA-compliant description for drawer
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", attributes: {}) ⇒ DrawerDescriptionComponent
constructor
A new instance of DrawerDescriptionComponent.
Methods included from DrawerDescriptionBehavior
#drawer_description_base_classes, #drawer_description_classes, #drawer_description_html_attributes
Constructor Details
#initialize(classes: "", attributes: {}) ⇒ DrawerDescriptionComponent
Returns a new instance of DrawerDescriptionComponent.
13 14 15 16 |
# File 'app/view_components/ui/drawer_description_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_description_component.rb', line 18 def call content_tag :p, content, **drawer_description_html_attributes.merge(@attributes) end |