Class: ButtonComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- ButtonComponent
- Defined in:
- lib/railwind/generators/templates/button/button_component.rb
Instance Method Summary collapse
-
#initialize(text:, variant: "primary", type: "button") ⇒ ButtonComponent
constructor
A new instance of ButtonComponent.
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 |