Module: IconTag::ViewHelpers

Defined in:
lib/icon_tag/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#icon_tag(icon, options = {}) ⇒ Object

icon: icon name from Font Awesome (without ‘fa’) Follow examples at: fortawesome.github.io/Font-Awesome/examples/ Options:

Size: lg, 2x, 3x, 4x
Spin: true or false
Fixed Width: "Use fa-fw to set icons at a fixed width. Great to use when different icon widths throw off alignment. Especially useful in things like nav lists & list groups."
Border: true or false
Rotate: 90, 180, 270
Flip: horizontal / vertical


13
14
15
# File 'lib/icon_tag/view_helpers.rb', line 13

def icon_tag(icon, options={})
  IconTag::Presenter.new(icon, options).html_tag
end