mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
16 lines
368 B
Ruby
16 lines
368 B
Ruby
|
|
module IconHelper
|
||
|
|
include FontAwesome::Sass::Rails::ViewHelpers
|
||
|
|
|
||
|
|
def icon_fw(icon, text = nil, html_options = {})
|
||
|
|
text, html_options = nil, text if text.is_a?(Hash)
|
||
|
|
|
||
|
|
if html_options.key?(:class)
|
||
|
|
html_options[:class] = "fa-fw #{html_options[:class]}"
|
||
|
|
else
|
||
|
|
html_options[:class] = "fa-fw"
|
||
|
|
end
|
||
|
|
|
||
|
|
icon(icon, text, html_options)
|
||
|
|
end
|
||
|
|
end
|