Class: Superform::Rails::Components::LabelComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Superform::Rails::Components::LabelComponent
- Defined in:
- lib/superform/rails.rb
Instance Attribute Summary
Attributes inherited from BaseComponent
Instance Method Summary collapse
Methods inherited from BaseComponent
Constructor Details
This class inherits a constructor from Superform::Rails::Components::BaseComponent
Instance Method Details
#field_attributes ⇒ Object
239 240 241 |
# File 'lib/superform/rails.rb', line 239 def field_attributes { for: dom.id } end |
#view_template(&content) ⇒ Object
234 235 236 237 |
# File 'lib/superform/rails.rb', line 234 def view_template(&content) content ||= Proc.new { field.key.to_s.titleize } label(**attributes, &content) end |