Sha256: 0ca9b1a5722c8e616647d80a68417b7fc019dcacab30abf7b01c266c9f07c861

Contents?: true

Size: 895 Bytes

Versions: 21

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbProgressStep
    class ProgressStep
      include Playbook::Props

      partial "pb_progress_step/progress_step"

      prop :orientation, type: Playbook::Props::Enum,
                         values: %w[vertical horizontal],
                         default: "horizontal"
      prop :icon, type: Playbook::Props::Boolean,
                  default: false
      prop :variant, type: Playbook::Props::Enum,
                         values: %w[default tracker],
                         default: "default"
      def classname
        generate_classname("pb_progress_step_kit", orientation, icon_class, variant_class)
      end

    private

      def icon_class
        icon === true ? "icon" : nil
      end

      def variant_class
        case variant
        when "tracker"
          "tracker"
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-6.4.2 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-6.4.1 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-6.4.0 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-6.3.1 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha4 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha3 app/pb_kits/playbook/pb_progress_step/progress_step.rb
playbook_ui-7.0.0.pre.alpha2 app/pb_kits/playbook/pb_progress_step/progress_step.rb