Class: ButtonComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/railwind/generators/templates/button/button_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(text:, variant: "primary", type: "button") ⇒ ButtonComponent

Returns a new instance of ButtonComponent.



2
3
4
5
6
# File 'lib/railwind/generators/templates/button/button_component.rb', line 2

def initialize(text:, variant: "primary", type: "button")
  @text = text
  @variant = variant
  @type = type
end