Extract component to render a single stat box

This commit is contained in:
Senén Rodero Rodríguez
2021-02-16 12:10:18 +01:00
committed by taitus
parent b6c269008f
commit 205cbd7d82
3 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
class Admin::Stats::StatComponent < ApplicationComponent
attr_reader :text, :amount, :options
def initialize(text:, amount:, options: {})
@text = text
@amount = amount
@options = options
end
end