Class: Form::LabelComponent

Inherits:
SparkComponents::Component
  • Object
show all
Defined in:
app/components/spark/form/label_component.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



5
6
7
8
9
10
11
# File 'app/components/spark/form/label_component.rb', line 5

def render
  tag.label(tag_attrs) do
    concat tag.div(text, class: "label-text") if text
    concat @yield
  end

end