You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
355 B

5 months ago
  1. # Font Awesome Helper
  2. module IconHelper
  3. def fa_icon(name, extra_class = nil, style: :solid, size: nil)
  4. content_class = "fa-#{style.to_s.dasherize} fa-#{name.to_s.dasherize}"
  5. content_class << " fa-#{size.to_s.dasherize}" if size
  6. content_class << " #{extra_class}" if extra_class
  7. tag.i(class: content_class, 'aria-hidden': true)
  8. end
  9. end