Sha256: 0e6841e7aae2db7bdd0a2024e9b943c33a19a3b284386e3fd758c150636ad851
Contents?: true
Size: 904 Bytes
Versions: 67
Compression:
Stored size: 904 Bytes
Contents
# frozen_string_literal: true module Playbook module PbStatChange class StatChange < Playbook::KitBase prop :change, type: Playbook::Props::Enum, values: %w[neutral increase decrease], default: "neutral" prop :icon, type: Playbook::Props::String prop :value, type: Playbook::Props::Numeric def status case change when "increase" "positive" when "decrease" "negative" else "neutral" end end def returned_icon if icon icon else case change when "increase" "arrow-up" when "decrease" "arrow-down" else false end end end def classname generate_classname("pb_stat_change_kit", status) end end end end
Version data entries
67 entries across 67 versions & 1 rubygems