Class: Pajamas::ProgressComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/pajamas/progress_component.rb

Constant Summary collapse

VARIANT_OPTIONS =
[:primary, :success].freeze

Instance Method Summary collapse

Constructor Details

#initialize(value: 0, variant: :primary) ⇒ ProgressComponent

Returns a new instance of ProgressComponent.



5
6
7
8
# File 'app/components/pajamas/progress_component.rb', line 5

def initialize(value: 0, variant: :primary)
  @value = value
  @variant = filter_attribute(variant, VARIANT_OPTIONS, default: :primary)
end