Class: PhlexKit::FieldDescription
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::FieldDescription
- Defined in:
- app/components/phlex_kit/field/field_description.rb
Overview
Muted helper text under (or beside) a Field's control, ported from shadcn/ui's FieldDescription. See field.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ FieldDescription
constructor
A new instance of FieldDescription.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ FieldDescription
Returns a new instance of FieldDescription.
5 |
# File 'app/components/phlex_kit/field/field_description.rb', line 5 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
6 7 8 |
# File 'app/components/phlex_kit/field/field_description.rb', line 6 def view_template(&) p(**mix({ class: "pk-field-description", data: { slot: "field-description" } }, @attrs), &) end |