Class: SaasPlatform::ButtonComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- SaasPlatform::ButtonComponent
- Defined in:
- app/components/saas_platform/button_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(variant: :primary, size: :md, type: :button, **system_arguments) ⇒ ButtonComponent
constructor
A new instance of ButtonComponent.
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
#call ⇒ Object
10 11 12 |
# File 'app/components/saas_platform/button_component.rb', line 10 def call content_tag(:button, content, type: @type, class: classes, **@system_arguments) end |