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.23.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.23.0.pre.cachetest app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.23.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.22.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.22.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.1.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.lightbox.2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.lightbox app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.rg1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.jg1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.na1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.21.0.pre.alpha.jd1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.20.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.19.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.19.0.pre.lightbox app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.18.2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.19.0.pre.popover.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-10.18.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb