diff options
Diffstat (limited to 'app/components')
-rw-r--r-- | app/components/diffs/overflow_warning_component.html.haml | 6 | ||||
-rw-r--r-- | app/components/pajamas/alert_component.html.haml | 7 | ||||
-rw-r--r-- | app/components/pajamas/alert_component.rb | 3 |
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', |