Module: MaquinaComponents::IconsHelper
- Defined in:
- app/helpers/maquina_components/icons_helper.rb
Instance Method Summary collapse
-
#builtin_icon_for(name, options = {}) ⇒ Object
Internal icon helper for engine components.
- #icon_for(name, options = {}) ⇒ Object
- #main_icon_svg_for(name) ⇒ Object
Instance Method Details
#builtin_icon_for(name, options = {}) ⇒ Object
Internal icon helper for engine components. Always uses built-in SVGs so components work reliably regardless of the app's icon configuration.
14 15 16 17 18 19 20 21 |
# File 'app/helpers/maquina_components/icons_helper.rb', line 14 def builtin_icon_for(name, = {}) return nil unless name svg = icon_svg_for(name.to_sym) return nil unless svg (svg, ) end |
#icon_for(name, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/maquina_components/icons_helper.rb', line 3 def icon_for(name, = {}) return nil unless name svg = main_icon_svg_for(name.to_sym) || icon_svg_for(name.to_sym) return nil unless svg (svg, ) end |
#main_icon_svg_for(name) ⇒ Object
23 24 |
# File 'app/helpers/maquina_components/icons_helper.rb', line 23 def main_icon_svg_for(name) end |