Class: Message::Component

Inherits:
Lookbook::BaseComponent
  • Object
show all
Defined in:
app/components/lookbook/message/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_positionObject (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

#themeObject (readonly)

Returns the value of attribute theme.



3
4
5
# File 'app/components/lookbook/message/component.rb', line 3

def theme
  @theme
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'app/components/lookbook/message/component.rb', line 3

def title
  @title
end