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/button_component.html.haml')
-rw-r--r--app/components/pajamas/button_component.html.haml8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/components/pajamas/button_component.html.haml b/app/components/pajamas/button_component.html.haml
new file mode 100644
index 00000000000..8ce7d9e0315
--- /dev/null
+++ b/app/components/pajamas/button_component.html.haml
@@ -0,0 +1,8 @@
+= content_tag tag, {**@button_options, **base_attributes, class: button_class, href: @href, target: @target } do
+ - if @loading
+ = gl_loading_icon(inline: true, css_class: 'gl-button-icon gl-button-loading-indicator')
+ - if @icon && (!@loading || content)
+ = sprite_icon(@icon, css_class: "gl-icon gl-button-icon #{@icon_classes}")
+ - if content
+ %span.gl-button-text{ class: @button_text_classes }
+ = content