Method: FComponents::Button::Component#initialize

Defined in:
app/components/f_components/button/component.rb

#initialize(title, href = nil, **options) ⇒ Component

Returns a new instance of Component.



32
33
34
35
36
37
38
39
40
41
# File 'app/components/f_components/button/component.rb', line 32

def initialize(title, href = nil, **options)
  @title     = title
  @href      = href || 'javascript: void(0);'
  @modifiers = options.delete(:mods)
  @type      = options.delete(:type) || :primary
  @tag       = options.delete(:tag) || :a
  @class     = options.delete(:class) || ''
  @left_icon = options.delete(:left_icon)
  @options   = options
end