Module: Tungsten::IconHelper

Defined in:
app/helpers/tungsten/icon_helper.rb

Instance Method Summary collapse

Instance Method Details

#status_icon(status, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/tungsten/icon_helper.rb', line 3

def status_icon (status, options={})
  options[:height] ||= '1em'
  span_options = {}

  span_options['aria-label'] = status.titlecase
  span_options[:class] = 'status-icon inline-icon has-tooltip'
  options[:desc] ||= status

   :span, span_options do
    use_svg "status-#{status}", options
  end
end