Sha256: d57452b7af5852912b8d511d2d82dab518eb2c158cdceccd41904872f378121e
Contents?: true
Size: 704 Bytes
Versions: 1194
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true module Playbook module PbTitleCount class TitleCount < Playbook::KitBase prop :align, type: Playbook::Props::Enum, values: %w[left center right], default: "left" prop :size, type: Playbook::Props::Enum, values: %w[lg sm], default: "sm" prop :title prop :count, type: Playbook::Props::Numeric def classname generate_classname("pb_title_count_kit", align, size) end def title_size size == "lg" ? 3 : 4 end def format_count count.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/, '\1,\2') end end end end
Version data entries
1,194 entries across 1,194 versions & 1 rubygems