Class: Lightning::UI::IconComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Lightning::UI::IconComponent
- Defined in:
- app/components/lightning/ui/icon_component.rb
Constant Summary collapse
- COLORS =
{ current: nil, default: 'slds-icon-text-default', error: 'slds-icon-text-error', light: 'slds-icon-text-light', success: 'slds-icon-text-success', warning: 'slds-icon-text-warning' }.freeze
- SIZES =
{ xx_small: 'slds-icon_xx-small', x_small: 'slds-icon_x-small', small: 'slds-icon_small', default: nil, large: 'slds-icon_large' }.freeze
- TYPES =
%i( action custom doctype standard ).freeze
Instance Method Summary collapse
-
#initialize(color: :default, name:, text: nil, type:, size: :default) ⇒ IconComponent
constructor
A new instance of IconComponent.
Constructor Details
#initialize(color: :default, name:, text: nil, type:, size: :default) ⇒ IconComponent
Returns a new instance of IconComponent.
28 29 30 31 32 33 34 |
# File 'app/components/lightning/ui/icon_component.rb', line 28 def initialize(color: :default, name:, text: nil, type:, size: :default) @color = color @name = name @text = text @type = type @size = size end |