From f38bcf2e443dd89acc774a2fa1efa2e881a67a90 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 6 May 2022 00:07:56 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/components/diffs/overflow_warning_component.html.haml | 6 +++--- app/components/pajamas/alert_component.html.haml | 7 ++++++- app/components/pajamas/alert_component.rb | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'app/components') 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', -- cgit v1.2.3