diff options
Diffstat (limited to 'app/components')
-rw-r--r-- | app/components/pajamas/alert_component.html.haml | 2 | ||||
-rw-r--r-- | app/components/pajamas/alert_component.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/components/pajamas/alert_component.html.haml b/app/components/pajamas/alert_component.html.haml index 782ac8b9ca2..82e2c2422b3 100644 --- a/app/components/pajamas/alert_component.html.haml +++ b/app/components/pajamas/alert_component.html.haml @@ -1,4 +1,4 @@ -.gl-alert{ role: 'alert', class: [base_class, @alert_class], data: @alert_data } +.gl-alert{ @alert_options, role: 'alert', class: [base_class, @alert_class], data: @alert_data } - if @show_icon = sprite_icon(icon, css_class: icon_classes) - if @dismissible diff --git a/app/components/pajamas/alert_component.rb b/app/components/pajamas/alert_component.rb index c1b2132da29..f6753c7fa60 100644 --- a/app/components/pajamas/alert_component.rb +++ b/app/components/pajamas/alert_component.rb @@ -13,13 +13,14 @@ module Pajamas # @param [Hash] close_button_data def initialize( title: nil, variant: :info, dismissible: true, show_icon: true, - alert_class: nil, alert_data: {}, close_button_class: nil, close_button_data: {}) + alert_class: nil, alert_data: {}, alert_options: {}, close_button_class: nil, close_button_data: {}) @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 end |