Class: SaasPlatform::ButtonComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/saas_platform/button_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(variant: :primary, size: :md, type: :button, **system_arguments) ⇒ ButtonComponent

Returns a new instance of ButtonComponent.



3
4
5
6
7
8
# File 'app/components/saas_platform/button_component.rb', line 3

def initialize(variant: :primary, size: :md, type: :button, **system_arguments)
  @variant = variant
  @size = size
  @type = type
  @system_arguments = system_arguments
end

Instance Method Details

#callObject



10
11
12
# File 'app/components/saas_platform/button_component.rb', line 10

def call
  (:button, content, type: @type, class: classes, **@system_arguments)
end