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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 18:08:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 18:08:43 +0300
commit9b8269e5708ba1c38610189f84cf7224b640c0ed (patch)
tree70916a0afcfd90ed5425a80bab7f6bedca13d622 /app/components
parent7a124e225ea58c2a432dd29f82ba682963886383 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/components')
-rw-r--r--app/components/diffs/overflow_warning_component.html.haml2
-rw-r--r--app/components/pajamas/alert_component.html.haml9
-rw-r--r--app/components/pajamas/alert_component.rb13
3 files changed, 9 insertions, 15 deletions
diff --git a/app/components/diffs/overflow_warning_component.html.haml b/app/components/diffs/overflow_warning_component.html.haml
index b184fa1d527..b334bfbcd89 100644
--- a/app/components/diffs/overflow_warning_component.html.haml
+++ b/app/components/diffs/overflow_warning_component.html.haml
@@ -1,6 +1,6 @@
= render Pajamas::AlertComponent.new(title: _('Too many changes to show.'),
variant: :warning,
- alert_class: 'gl-mb-5') do |c|
+ alert_options: { class: 'gl-mb-5' }) do |c|
= c.body do
= message
diff --git a/app/components/pajamas/alert_component.html.haml b/app/components/pajamas/alert_component.html.haml
index 82e2c2422b3..13c458f05e9 100644
--- a/app/components/pajamas/alert_component.html.haml
+++ b/app/components/pajamas/alert_component.html.haml
@@ -1,11 +1,10 @@
-.gl-alert{ @alert_options, role: 'alert', class: [base_class, @alert_class], data: @alert_data }
+.gl-alert{ @alert_options, role: 'alert', class: base_class }
- if @show_icon
= sprite_icon(icon, css_class: icon_classes)
- if @dismissible
- %button.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-close{ type: 'button',
- aria: { label: _('Dismiss') },
- class: @close_button_class,
- data: @close_button_data }
+ %button.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-close{ @close_button_options,
+ type: 'button',
+ aria: { label: _('Dismiss') } }
= sprite_icon('close')
.gl-alert-content{ role: 'alert' }
- if @title
diff --git a/app/components/pajamas/alert_component.rb b/app/components/pajamas/alert_component.rb
index f6753c7fa60..cfab34f537e 100644
--- a/app/components/pajamas/alert_component.rb
+++ b/app/components/pajamas/alert_component.rb
@@ -7,22 +7,17 @@ module Pajamas
# @param [Symbol] variant
# @param [Boolean] dismissible
# @param [Boolean] show_icon
- # @param [String] alert_class
- # @param [Hash] alert_data
- # @param [String] close_button_class
- # @param [Hash] close_button_data
+ # @param [Hash] alert_options
+ # @param [Hash] close_button_options
def initialize(
title: nil, variant: :info, dismissible: true, show_icon: true,
- alert_class: nil, alert_data: {}, alert_options: {}, close_button_class: nil, close_button_data: {})
+ alert_options: {}, close_button_options: {})
@title = title
@variant = variant
@dismissible = dismissible
@show_icon = show_icon
- @alert_class = alert_class
- @alert_data = alert_data
@alert_options = alert_options
- @close_button_class = close_button_class
- @close_button_data = close_button_data
+ @close_button_options = close_button_options
end
def base_class