Sha256: 94c1bfafb305901c8d6b81df794f1f3c214c679075b976211aa745ae32f6794b

Contents?: true

Size: 742 Bytes

Versions: 1224

Compression:

Stored size: 742 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbLabelValue
    class LabelValue < Playbook::KitBase
      prop :label, required: true
      prop :value
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[default details],
                     default: "default"
      prop :icon
      prop :description
      prop :title
      prop :date
      prop :active, type: Playbook::Props::Boolean, default: false

      def classname
        generate_classname("pb_label_value_kit", variant_class)
      end

      def date_element
        "&middot; #{date.strftime('%m/%d')}".html_safe
      end

    private

      def variant_class
        variant == "details" ? "details" : nil
      end
    end
  end
end

Version data entries

1,224 entries across 1,224 versions & 1 rubygems

Version Path
playbook_ui-14.12.0.pre.alpha.play1790darkaudittable5802 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.play1752updatecontenttag5801 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.6 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.5 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobug5781 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.4 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.playrailsinputmaskissue5775 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5757 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5754 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.3 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PLAY1865reactdatepickerreinitializingbug5732 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5728 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5716 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5714 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.2 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.1 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.13.0.pre.rc.0 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-14.12.0.pre.alpha.advancedtablealignmentfixes5693 app/pb_kits/playbook/pb_label_value/label_value.rb