Class: PhlexKit::FieldLabel

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/field/field_label.rb

Overview

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ FieldLabel

Returns a new instance of FieldLabel.



7
# File 'app/components/phlex_kit/field/field_label.rb', line 7

def initialize(**attrs) = (@attrs = attrs)

Instance Method Details

#view_templateObject



8
9
10
# File 'app/components/phlex_kit/field/field_label.rb', line 8

def view_template(&)
  label(**mix({ class: "pk-label pk-field-label", data: { slot: "field-label" } }, @attrs), &)
end