Class: Shadcn::ProgressComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::ProgressComponent
- Defined in:
- app/components/shadcn/progress_component.rb
Overview
Progress component for showing completion status Matches shadcn/ui Progress component
Constant Summary collapse
- BASE_CLASSES =
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20"- INDICATOR_CLASSES =
"h-full w-full flex-1 bg-primary transition-all"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
-
#initialize(value: nil, max: 100, indeterminate: false, **options) ⇒ ProgressComponent
constructor
A new instance of ProgressComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(value: nil, max: 100, indeterminate: false, **options) ⇒ ProgressComponent
Returns a new instance of ProgressComponent.
23 24 25 26 27 28 |
# File 'app/components/shadcn/progress_component.rb', line 23 def initialize(value: nil, max: 100, indeterminate: false, **) super(**) @value = value @max = max @indeterminate = indeterminate end |