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.



7
8
9
10
# File 'app/components/pajamas/progress_component.rb', line 7

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