Sha256: 25570cdfcb97cc096e60c7ecad8df73d454f2758226ffb935bcac70f923834b6

Contents?: true

Size: 725 Bytes

Versions: 199

Compression:

Stored size: 725 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbDashboardValue
    class DashboardValue
      include Playbook::Props

      partial "pb_dashboard_value/dashboard_value"

      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

199 entries across 199 versions & 1 rubygems

Version Path
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.16.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.15.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.15.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.14.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.13.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.12.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.12.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.11.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.10.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.9.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.8.4 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.8.3 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.8.2 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.8.1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.8.0 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb