Class: IRuby::Input::Label

Inherits:
Widget
  • Object
show all
Defined in:
lib/iruby/input/label.rb

Direct Known Subclasses

Button, Checkbox, Field, File, Multiple, Radio, Select

Instance Method Summary collapse

Methods inherited from Widget

builder, #content, #widget_css, #widget_display, #widget_html, #widget_join, #widget_js

Instance Method Details

#widget_labelObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/iruby/input/label.rb', line 6

def widget_label
  div class: 'iruby-label input-group' do
    span class: 'input-group-addon' do
      text @label || to_label(@key)
    end

    yield

    if @icon
      span @icon, class: "input-group-addon"
    end
  end
end