Class: Solidstats::Ui::SummaryCardComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Solidstats::Ui::SummaryCardComponent
- Defined in:
- app/components/solidstats/ui/summary_card_component.rb
Overview
Reusable summary card component for dashboard metrics
Instance Method Summary collapse
-
#initialize(title:, value:, status: :ok, icon: nil, section: nil, tab: nil, href: nil, **options) ⇒ SummaryCardComponent
constructor
A new instance of SummaryCardComponent.
Methods inherited from BaseComponent
#css_classes, #format_number, #safe_get, #status_class, #status_icon, #status_text
Constructor Details
#initialize(title:, value:, status: :ok, icon: nil, section: nil, tab: nil, href: nil, **options) ⇒ SummaryCardComponent
Returns a new instance of SummaryCardComponent.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/components/solidstats/ui/summary_card_component.rb', line 7 def initialize(title:, value:, status: :ok, icon: nil, section: nil, tab: nil, href: nil, **) @title = title @value = value @status = status @icon = icon @section = section @tab = tab @href = href = end |