Class: Panda::Core::Admin::StatisticsComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/panda/core/admin/statistics_component.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#after_template, #attrs, #before_template, #default_attrs, #merge_attrs, #tailwind_merge_attrs

Instance Method Details

#view_templateObject



10
11
12
13
14
15
# File 'app/components/panda/core/admin/statistics_component.rb', line 10

def view_template
  div(class: "overflow-hidden p-4 bg-gradient-to-br rounded-lg border-2 from-light/20 to-light border-mid") do
    dt(class: "text-base font-medium truncate text-dark") { @metric }
    dd(class: "mt-1 text-3xl font-medium tracking-tight text-dark") { @value }
  end
end