Class: Message::Component
- Inherits:
-
Lookbook::BaseComponent
- Object
- Lookbook::BaseComponent
- Message::Component
- Defined in:
- app/components/lookbook/message/component.rb
Instance Attribute Summary collapse
-
#icon_name ⇒ Object
readonly
Returns the value of attribute icon_name.
-
#icon_position ⇒ Object
readonly
Returns the value of attribute icon_position.
-
#theme ⇒ Object
readonly
Returns the value of attribute theme.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title: nil, icon: nil, icon_position: :left, theme: :info, **html_attrs) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(title: nil, icon: nil, icon_position: :left, theme: :info, **html_attrs) ⇒ Component
Returns a new instance of Component.
5 6 7 8 9 10 11 |
# File 'app/components/lookbook/message/component.rb', line 5 def initialize(title: nil, icon: nil, icon_position: :left, theme: :info, **html_attrs) @title = title @icon_name = icon @icon_position = icon_position @theme = theme super(**html_attrs) end |
Instance Attribute Details
#icon_name ⇒ Object (readonly)
Returns the value of attribute icon_name.
3 4 5 |
# File 'app/components/lookbook/message/component.rb', line 3 def icon_name @icon_name end |
#icon_position ⇒ Object (readonly)
Returns the value of attribute icon_position.
3 4 5 |
# File 'app/components/lookbook/message/component.rb', line 3 def icon_position @icon_position end |
#theme ⇒ Object (readonly)
Returns the value of attribute theme.
3 4 5 |
# File 'app/components/lookbook/message/component.rb', line 3 def theme @theme end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'app/components/lookbook/message/component.rb', line 3 def title @title end |