Class: Solidstats::Ui::ActionButtonComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Solidstats::Ui::ActionButtonComponent
- Defined in:
- app/components/solidstats/ui/action_button_component.rb
Overview
Reusable action button component with consistent styling
Instance Method Summary collapse
-
#initialize(text:, variant: :primary, size: :md, icon: nil, href: nil, **options) ⇒ ActionButtonComponent
constructor
A new instance of ActionButtonComponent.
Methods inherited from BaseComponent
#css_classes, #format_number, #safe_get, #status_class, #status_icon, #status_text
Constructor Details
#initialize(text:, variant: :primary, size: :md, icon: nil, href: nil, **options) ⇒ ActionButtonComponent
Returns a new instance of ActionButtonComponent.
7 8 9 10 11 12 13 14 15 |
# File 'app/components/solidstats/ui/action_button_component.rb', line 7 def initialize(text:, variant: :primary, size: :md, icon: nil, href: nil, **) @text = text @variant = variant @size = size @icon = icon @href = href @options = super() end |