Sha256: 3c48f16cb864242ee0a61f22f6a085acedc91863a2b177eed5515405e8ceb915
Contents?: true
Size: 946 Bytes
Versions: 96
Compression:
Stored size: 946 Bytes
Contents
# frozen_string_literal: true module Playbook module PbProgressPills class ProgressPills include Playbook::Props partial "pb_progress_pills/progress_pills" prop :active, type: Playbook::Props::Number, default: 0 prop :value prop :dark, type: Playbook::Props::Boolean, default: false prop :steps, type: Playbook::Props::Number, default: 3 prop :title def classname generate_classname("pb_progress_pills_kit", dark_class) end def with_status yield title if title.present? end def each_step(&block) 1.upto(steps, &block) end def active_step(step) step <= active ? "_active" : "_inactive" end def dark_pill dark ? "_dark" : nil end private def dark_class dark ? "dark" : nil end end end end
Version data entries
96 entries across 96 versions & 1 rubygems