Class: Maglev::Uikit::IconButtonComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/maglev/uikit/icon_button_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

#button_class_names

Constructor Details

#initialize(icon_name: nil, **options) ⇒ IconButtonComponent

Returns a new instance of IconButtonComponent.



8
9
10
11
# File 'app/components/maglev/uikit/icon_button_component.rb', line 8

def initialize(icon_name: nil, **options)
  @icon_name = icon_name
  @options = options
end

Instance Attribute Details

#icon_nameObject (readonly)

Returns the value of attribute icon_name.



6
7
8
# File 'app/components/maglev/uikit/icon_button_component.rb', line 6

def icon_name
  @icon_name
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'app/components/maglev/uikit/icon_button_component.rb', line 6

def options
  @options
end

Instance Method Details

#button_classesObject



13
14
15
# File 'app/components/maglev/uikit/icon_button_component.rb', line 13

def button_classes(...)
  helpers.maglev_icon_button_classes(...)
end