Sha256: 6240a4b98ebe4dea9cc4ae763e6c2e2256999836bde79a2e2dce21f272429695

Contents?: true

Size: 798 Bytes

Versions: 104

Compression:

Stored size: 798 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbLabelValue
    class LabelValue
      include Playbook::Props

      partial "pb_label_value/label_value"

      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
        "· #{date.strftime('%m/%d')}".html_safe
      end

    private

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

Version data entries

104 entries across 104 versions & 1 rubygems

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