Class: UI::FieldContentComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::FieldContentComponent
- Includes:
- FieldContentBehavior
- Defined in:
- app/view_components/ui/field_content_component.rb
Overview
FieldContentComponent - ViewComponent implementation
Flex column that groups control and descriptions. Uses FieldContentBehavior concern for shared styling logic.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ FieldContentComponent
constructor
A new instance of FieldContentComponent.
Methods included from FieldContentBehavior
#field_content_classes, #field_content_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ FieldContentComponent
Returns a new instance of FieldContentComponent.
17 18 19 20 |
# File 'app/view_components/ui/field_content_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_content_component.rb', line 22 def call content_tag :div, **field_content_html_attributes do content end end |