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
- #icon(name, options = {}) ⇒ Object (also: #get_icon)
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, ={}) if name.is_a? Symbol svg = find_icon(symbol: name) svg_use_tag svg, else svg = find_icon(id: name) svg_tag svg, end end |