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-10.18.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.17.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.16.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.15.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.15.1.pre.alpha.rubocop.deps app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.15.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.14.1.pre.alpha2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.14.1.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.14.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.13.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.13.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.13.0.pre.node.update app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.12.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.11.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.10.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.9.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.8.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.7.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb