Module: Interage::MaterialDesignIconsHelper
- Included in:
- ApplicationHelper
- Defined in:
- lib/interage/material_design_icons_helper.rb
Instance Method Summary collapse
- #md_classes(icon, options = {}) ⇒ Object
- #md_icon(icon, options = {}) ⇒ Object
- #md_icon_text(icon, text, options = {}) ⇒ Object
Instance Method Details
#md_classes(icon, options = {}) ⇒ Object
21 22 23 |
# File 'lib/interage/material_design_icons_helper.rb', line 21 def md_classes(icon, = {}) app_icon_classes(icon, 'material-icons', 'md', ) end |
#md_icon(icon, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/interage/material_design_icons_helper.rb', line 5 def md_icon(icon, = {}) icon_classes = icon.to_s.split(' ') icon = icon_classes.shift content_tag :i, class: md_classes(icon, ) do t("icons_alias.#{icon}", default: icon) end end |
#md_icon_text(icon, text, options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/interage/material_design_icons_helper.rb', line 14 def md_icon_text(icon, text, = {}) content_tag :span do concat md_icon(icon, ) concat " #{text}" end end |