Class: Satis::LinkButton::Component

Inherits:
ApplicationComponent show all
Defined in:
app/components/satis/link_button/component.rb

Instance Attribute Summary collapse

Attributes inherited from ApplicationComponent

#original_view_context

Instance Method Summary collapse

Methods inherited from ApplicationComponent

add_helper, #component_name

Constructor Details

#initialize(type, title: nil, icon: nil, url: nil) ⇒ Component

renders_many :items



8
9
10
11
12
13
14
# File 'app/components/satis/link_button/component.rb', line 8

def initialize(type, title: nil, icon: nil, url: nil)
  @type = type.to_sym
  @title = title
  @icon = icon
  @url = url
  @class_names = class_names
end

Instance Attribute Details

#class_namesObject (readonly)

Returns the value of attribute class_names.



6
7
8
# File 'app/components/satis/link_button/component.rb', line 6

def class_names
  @class_names
end

#iconObject (readonly)

Returns the value of attribute icon.



6
7
8
# File 'app/components/satis/link_button/component.rb', line 6

def icon
  @icon
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'app/components/satis/link_button/component.rb', line 6

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'app/components/satis/link_button/component.rb', line 6

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



6
7
8
# File 'app/components/satis/link_button/component.rb', line 6

def url
  @url
end