diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/components | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/components')
-rw-r--r-- | app/components/pajamas/banner_component.html.haml | 3 | ||||
-rw-r--r-- | app/components/pajamas/banner_component.rb | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/components/pajamas/banner_component.html.haml b/app/components/pajamas/banner_component.html.haml index c2eeae2d8c9..8a177edddb5 100644 --- a/app/components/pajamas/banner_component.html.haml +++ b/app/components/pajamas/banner_component.html.haml @@ -19,5 +19,4 @@ - actions.each do |action| = action - %button.gl-button.gl-banner-close.btn-sm.btn-icon.js-close{ @close_options, class: close_class, type: 'button' } - = sprite_icon('close', size: 16, css_class: 'dismiss-icon') + = render Pajamas::ButtonComponent.new(category: :tertiary, variant: close_button_variant, size: :small, icon: 'close', button_options: @close_options) diff --git a/app/components/pajamas/banner_component.rb b/app/components/pajamas/banner_component.rb index 1a03f3fdd58..5291db91fb2 100644 --- a/app/components/pajamas/banner_component.rb +++ b/app/components/pajamas/banner_component.rb @@ -27,7 +27,7 @@ module Pajamas @svg_path = svg_path.to_s @banner_options = banner_options @button_options = button_options - @close_options = close_options + @close_options = format_options(options: close_options, css_classes: %w[js-close gl-banner-close]) end VARIANT_OPTIONS = [:introduction, :promotion].freeze @@ -41,11 +41,11 @@ module Pajamas classes.join(' ') end - def close_class + def close_button_variant if introduction? - 'btn-confirm btn-confirm-tertiary' + :confirm else - 'btn-default btn-default-tertiary' + :default end end |