Class: PhlexKit::FormFieldHint
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::FormFieldHint
- Defined in:
- app/components/phlex_kit/form_field/form_field_hint.rb
Overview
Muted helper text under a PhlexKit::FormField control. Hidden when empty. See form_field.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ FormFieldHint
constructor
A new instance of FormFieldHint.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ FormFieldHint
Returns a new instance of FormFieldHint.
5 6 7 |
# File 'app/components/phlex_kit/form_field/form_field_hint.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/form_field/form_field_hint.rb', line 9 def view_template(&block) p(**mix({ class: "pk-form-field-hint" }, @attrs), &block) end |