Class: Adminterface::Extensions::Views::Components::Icon

Inherits:
ActiveAdmin::Component
  • Object
show all
Defined in:
lib/adminterface/extensions/views/components/icon.rb

Overview

Custom component for icon

Instance Method Summary collapse

Instance Method Details

#build(icon, attributes = {}) ⇒ Object



10
11
12
13
# File 'lib/adminterface/extensions/views/components/icon.rb', line 10

def build(icon, attributes = {})
  super(attributes)
  add_class icon
end

#default_class_nameObject



19
20
21
# File 'lib/adminterface/extensions/views/components/icon.rb', line 19

def default_class_name
  "aa-icon #{icon_css_classes}".squish
end

#tag_nameObject



15
16
17
# File 'lib/adminterface/extensions/views/components/icon.rb', line 15

def tag_name
  :i
end