Class: ButtonComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Alveole::Concerns::Bem
Defined in:
lib/alveole/components/button_component.rb

Constant Summary collapse

MODIFIERS =
%i[small icon_only primary].freeze

Instance Method Summary collapse

Methods included from Alveole::Concerns::Bem

#modifiers=

Constructor Details

#initialize(url:, label:, icon: nil, modifiers: [], options: {}) ⇒ ButtonComponent

Returns a new instance of ButtonComponent.



6
7
8
9
10
11
12
13
14
# File 'lib/alveole/components/button_component.rb', line 6

def initialize(url:, label:, icon: nil, modifiers: [], options: {})
  super

  @url = url
  @label = label
  @icon = icon
  @options = options
  self.modifiers = modifiers
end