summaryrefslogtreecommitdiff
path: root/app/components/pajamas/banner_component.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/pajamas/banner_component.rb')
-rw-r--r--app/components/pajamas/banner_component.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/components/pajamas/banner_component.rb b/app/components/pajamas/banner_component.rb
index 9b6343b47c9..6082762f22c 100644
--- a/app/components/pajamas/banner_component.rb
+++ b/app/components/pajamas/banner_component.rb
@@ -23,13 +23,15 @@ module Pajamas
@button_text = button_text
@button_link = button_link
@embedded = embedded
- @variant = variant.to_sym
+ @variant = filter_attribute(variant.to_sym, VARIANT_OPTIONS, default: :promotion)
@svg_path = svg_path.to_s
@banner_options = banner_options
@button_options = button_options
@close_options = close_options
end
+ VARIANT_OPTIONS = [:introduction, :promotion].freeze
+
private
def banner_class