Sha256: 52b43c0034b84ed79ea9830055258bd0b19b2f3f79e2aa65e7684d43109726f2

Contents?: true

Size: 662 Bytes

Versions: 145

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbDashboardValue
    class DashboardValue < Playbook::KitBase
      prop :align, type: Playbook::Props::Enum,
                   values: %w[left center right],
                   default: "left"
      prop :stat_change, type: Playbook::Props::Hash,
                         default: {}
      prop :stat_label
      prop :stat_value, type: Playbook::Props::Hash,
                        default: {}

      def formatted_stat_value
        { **stat_value, value: stat_value[:value].to_i }
      end

      def classname
        generate_classname("pb_dashboard_value_kit", align)
      end
    end
  end
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.18.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.17.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.16.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.15.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.14.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.13.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.12.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.11.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.10.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb