Class: Irelia::Icon::Component
- Defined in:
- app/components/irelia/icon/component.rb
Instance Method Summary collapse
Methods inherited from Component
#add_css_classes, after_initialize, #html_options, inherited, #initialize, run_after_initialize_hooks
Constructor Details
This class inherits a constructor from Irelia::Component
Instance Method Details
#call ⇒ Object
13 14 15 16 17 |
# File 'app/components/irelia/icon/component.rb', line 13 def call content_tag(:span, ) do content_tag(:i, nil, class: (icon_class || content)) end end |
#variants ⇒ Object
6 7 8 9 10 11 |
# File 'app/components/irelia/icon/component.rb', line 6 def variants class_names( "irelia-icon", "irelia-icon--default": variant == :default ) end |