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.8.0.pre.alpha.PLAY1658tanstackbump4657 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4567 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4559 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.9.0.pre.rc.1 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY16254545 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4543 app/pb_kits/playbook/pb_timeline/timeline.rb
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4539 app/pb_kits/playbook/pb_timeline/timeline.rb