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-05-06 03:07:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 03:07:56 +0300
commitf38bcf2e443dd89acc774a2fa1efa2e881a67a90 (patch)
treeac135b383df45c9536206dc41650b95b8dc7aa51 /app/components
parenta29707687893beecb0e333a12e6f9e093a77eeb9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/components')
-rw-r--r--app/components/diffs/overflow_warning_component.html.haml6
-rw-r--r--app/components/pajamas/alert_component.html.haml7
-rw-r--r--app/components/pajamas/alert_component.rb3
3 files changed, 12 insertions, 4 deletions
diff --git a/app/components/diffs/overflow_warning_component.html.haml b/app/components/diffs/overflow_warning_component.html.haml
index 907d066e73d..b184fa1d527 100644
--- a/app/components/diffs/overflow_warning_component.html.haml
+++ b/app/components/diffs/overflow_warning_component.html.haml
@@ -1,9 +1,9 @@
= render Pajamas::AlertComponent.new(title: _('Too many changes to show.'),
variant: :warning,
- alert_class: 'gl-mb-5') do
- .gl-alert-body
+ alert_class: 'gl-mb-5') do |c|
+ = c.body do
= message
- .gl-alert-actions
+ = c.actions do
= diff_link
= patch_link
diff --git a/app/components/pajamas/alert_component.html.haml b/app/components/pajamas/alert_component.html.haml
index 92bf81a4f8d..782ac8b9ca2 100644
--- a/app/components/pajamas/alert_component.html.haml
+++ b/app/components/pajamas/alert_component.html.haml
@@ -11,4 +11,9 @@
- if @title
%h4.gl-alert-title
= @title
- = content
+ - if body?
+ .gl-alert-body
+ = body
+ - if actions?
+ .gl-alert-actions
+ = actions
diff --git a/app/components/pajamas/alert_component.rb b/app/components/pajamas/alert_component.rb
index ef35ae195b0..c1b2132da29 100644
--- a/app/components/pajamas/alert_component.rb
+++ b/app/components/pajamas/alert_component.rb
@@ -36,6 +36,9 @@ module Pajamas
delegate :sprite_icon, to: :helpers
+ renders_one :body
+ renders_one :actions
+
ICONS = {
info: 'information-o',
warning: 'warning',