Class: AblyUi::Core::Icon

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/ably_ui/core/icon/icon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, size: '0.75rem', color: '', additional_css: '', **additional_attributes) ⇒ Icon

Returns a new instance of Icon.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ably_ui/core/icon/icon.rb', line 10

def initialize(
  name:,
  size: '0.75rem',
  color: '',
  additional_css: '',
  **additional_attributes
)
  @name = name
  @size = size
  @color = color
  @additional_css = additional_css
  @additional_attributes = additional_attributes
end

Instance Attribute Details

#additional_attributesObject (readonly)

Returns the value of attribute additional_attributes.



8
9
10
# File 'lib/ably_ui/core/icon/icon.rb', line 8

def additional_attributes
  @additional_attributes
end

#additional_cssObject (readonly)

Returns the value of attribute additional_css.



7
8
9
# File 'lib/ably_ui/core/icon/icon.rb', line 7

def additional_css
  @additional_css
end

#colorObject (readonly)

Returns the value of attribute color.



6
7
8
# File 'lib/ably_ui/core/icon/icon.rb', line 6

def color
  @color
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/ably_ui/core/icon/icon.rb', line 4

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



5
6
7
# File 'lib/ably_ui/core/icon/icon.rb', line 5

def size
  @size
end