Module: Shipyard::IconHelper

Includes:
ActionView::Context, ActionView::Helpers::TagHelper
Included in:
AlertHelper, Jekyll::Icon
Defined in:
lib/shipyard-framework/helpers/icon_helper.rb

Instance Method Summary collapse

Instance Method Details

#icon(name, options = {}) ⇒ Object Also known as: get_icon



6
7
8
9
10
11
12
13
14
# File 'lib/shipyard-framework/helpers/icon_helper.rb', line 6

def icon(name, options={})
  if name.is_a? Symbol
    svg = find_icon(symbol: name)
    svg_use_tag svg, options
  else
    svg = find_icon(id: name)
    svg_tag svg, options
  end
end