Module: Shoehorn::Helpers::LabelHelpers
- Defined in:
- lib/shoehorn/helpers/label_helpers.rb
Instance Method Summary collapse
-
#bootstrap_label(message, options = {}) ⇒ Object
Renders inline label.
Instance Method Details
#bootstrap_label(message, options = {}) ⇒ Object
Renders inline label
Examples
bootstrap_label("Hello!")
# => '<span class="label">Hello!</span>'
bootstrap_label("Hello!", type: 'warning')
# => '<span class="label label-warning">Hello!</span>'
bootstrap_label("Hello!", type: 'important', class: "my_awesome_class")
# => '<span class="my_awesome_class label label-important">Hello!</span>'
bootstrap_label("Hello!", type: 'info', bootstrap_class_prefix: "my_label")
# => '<span class="my_label my_label-info">Hello!</span>'
Returns HTML String for the label
29 30 31 32 33 34 |
# File 'lib/shoehorn/helpers/label_helpers.rb', line 29 def bootstrap_label(, = {}) Shoehorn::Components::Label.new( , ).to_s end |