Class: UI::FieldDescriptionComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::FieldDescriptionComponent
- Includes:
- FieldDescriptionBehavior
- Defined in:
- app/view_components/ui/field_description_component.rb
Overview
FieldDescriptionComponent - ViewComponent implementation
Helper text for form fields. Uses FieldDescriptionBehavior concern for shared styling logic.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ FieldDescriptionComponent
constructor
A new instance of FieldDescriptionComponent.
Methods included from FieldDescriptionBehavior
#field_description_classes, #field_description_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ FieldDescriptionComponent
Returns a new instance of FieldDescriptionComponent.
17 18 19 20 |
# File 'app/view_components/ui/field_description_component.rb', line 17 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 |
# File 'app/view_components/ui/field_description_component.rb', line 22 def call content_tag :p, **field_description_html_attributes do content end end |