Class: PhlexKit::FieldGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::FieldGroup
- Defined in:
- app/components/phlex_kit/field/field_group.rb
Overview
Column of Fields with the canonical rhythm, ported from shadcn/ui's FieldGroup. Also the CONTAINER for responsive fields — a Field with orientation: :responsive goes horizontal when this group is ≥28rem wide. See field.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ FieldGroup
constructor
A new instance of FieldGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ FieldGroup
Returns a new instance of FieldGroup.
7 |
# File 'app/components/phlex_kit/field/field_group.rb', line 7 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
8 9 10 |
# File 'app/components/phlex_kit/field/field_group.rb', line 8 def view_template(&) div(**mix({ class: "pk-field-group", data: { slot: "field-group" } }, @attrs), &) end |