Sha256: 49b95078aa827cf1fc1dd0d8c380aaf8c5569325d6df237471f335c1d6b1cfe8

Contents?: true

Size: 853 Bytes

Versions: 28

Compression:

Stored size: 853 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbTimeline
    class Timeline < Playbook::KitBase
      prop :orientation, type: Playbook::Props::Enum,
                         values: %w[vertical horizontal],
                         default: "horizontal"
      prop :show_date, type: Playbook::Props::Boolean,
                       default: false
      prop :gap, type: Playbook::Props::Enum,
                 values: %w[xs sm md lg none],
                 default: "none"

      def classname
        generate_classname("pb_timeline_kit",
                           orientation,
                           date_class,
                           gap_class)
      end

    private

      def date_class
        show_date ? "with_date" : nil
      end

      def gap_class
        gap == "none" ? nil : "gap_#{gap}"
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
playbook_ui-14.9.0.pre.rc.0 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.7.0.pre.alpha.dependabotnpmandyarnfloatinguireact026284532 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.7.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4523 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.rc.8 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.rc.7 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.rc.6 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.rc.5 app/pb_kits/playbook/pb_timeline/timeline.rb