Class: Arara::MaterialIconComponent

Inherits:
ActionView::Component::Base
  • Object
show all
Includes:
BaseComponent
Defined in:
app/components/arara/material_icon_component.rb

Instance Method Summary collapse

Methods included from BaseComponent

#default_data_controller, #default_html_tag, #html_class, #html_content, #html_data, #html_options, #html_tag, included

Constructor Details

#initialize(icon:, **kw) ⇒ MaterialIconComponent

Returns a new instance of MaterialIconComponent.



5
6
7
8
# File 'app/components/arara/material_icon_component.rb', line 5

def initialize(icon:, **kw)
  super(tag: "i", **kw)
  @icon = icon
end

Instance Method Details

#contentObject



14
15
16
# File 'app/components/arara/material_icon_component.rb', line 14

def content
  @icon
end

#default_html_classObject



10
11
12
# File 'app/components/arara/material_icon_component.rb', line 10

def default_html_class
  "material-icons"
end