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:
Diffstat (limited to 'app/components/pajamas/alert_component.rb')
-rw-r--r--app/components/pajamas/alert_component.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/components/pajamas/alert_component.rb b/app/components/pajamas/alert_component.rb
index 4475f4cde6e..008d624b7e2 100644
--- a/app/components/pajamas/alert_component.rb
+++ b/app/components/pajamas/alert_component.rb
@@ -50,5 +50,13 @@ module Pajamas
def icon_classes
"gl-alert-icon#{' gl-alert-icon-no-title' if @title.nil?}"
end
+
+ def dismissible_button_options
+ new_options = @close_button_options.deep_symbolize_keys # in case strings were used
+ new_options[:class] = "js-close gl-dismiss-btn #{new_options[:class]}"
+ new_options[:aria] ||= {}
+ new_options[:aria][:label] = _('Dismiss') # this will wipe out label if already present
+ new_options
+ end
end
end