Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/pajamas/progress_component.rb')
-rw-r--r--app/components/pajamas/progress_component.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/components/pajamas/progress_component.rb b/app/components/pajamas/progress_component.rb
new file mode 100644
index 00000000000..1365da13863
--- /dev/null
+++ b/app/components/pajamas/progress_component.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module Pajamas
+ class ProgressComponent < Pajamas::Component
+ def initialize(value: 0, variant: :primary)
+ @value = value
+ @variant = filter_attribute(variant, VARIANT_OPTIONS, default: :primary)
+ end
+
+ VARIANT_OPTIONS = [:primary, :success].freeze
+ end
+end