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.0.1.pre.alpha9 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.5.1 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.5.0 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.4.2 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.4.1 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.4.0 app/pb_kits/playbook/pb_label_value/label_value.rb
playbook_ui-6.3.1 app/pb_kits/playbook/pb_label_value/label_value.rb