Class: UI::FieldGroup
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::FieldGroup
- Includes:
- FieldGroupBehavior
- Defined in:
- app/components/ui/field_group.rb
Overview
Group - Phlex implementation
Layout wrapper that stacks Field components. Uses FieldGroupBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ FieldGroup
constructor
A new instance of FieldGroup.
- #view_template(&block) ⇒ Object
Methods included from FieldGroupBehavior
#field_group_classes, #field_group_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ FieldGroup
Returns a new instance of FieldGroup.
18 19 20 21 |
# File 'app/components/ui/field_group.rb', line 18 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
23 24 25 26 27 |
# File 'app/components/ui/field_group.rb', line 23 def view_template(&block) div(**field_group_html_attributes) do yield if block_given? end end |