Class: UI::FieldContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::FieldContent
- Includes:
- FieldContentBehavior
- Defined in:
- app/components/ui/field_content.rb
Overview
Content - Phlex implementation
Flex column that groups control and descriptions. Uses FieldContentBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ FieldContent
constructor
A new instance of FieldContent.
- #view_template(&block) ⇒ Object
Methods included from FieldContentBehavior
#field_content_classes, #field_content_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ FieldContent
Returns a new instance of FieldContent.
15 16 17 18 |
# File 'app/components/ui/field_content.rb', line 15 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
20 21 22 23 24 |
# File 'app/components/ui/field_content.rb', line 20 def view_template(&block) div(**field_content_html_attributes) do yield if block_given? end end |