diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /app/components/pajamas/button_component.html.haml | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/components/pajamas/button_component.html.haml')
-rw-r--r-- | app/components/pajamas/button_component.html.haml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/components/pajamas/button_component.html.haml b/app/components/pajamas/button_component.html.haml index 8ce7d9e0315..5cf57deb7f1 100644 --- a/app/components/pajamas/button_component.html.haml +++ b/app/components/pajamas/button_component.html.haml @@ -1,4 +1,4 @@ -= content_tag tag, {**@button_options, **base_attributes, class: button_class, href: @href, target: @target } do += content_for :pajamas_button_content, flush: true do - if @loading = gl_loading_icon(inline: true, css_class: 'gl-button-icon gl-button-loading-indicator') - if @icon && (!@loading || content) @@ -6,3 +6,10 @@ - if content %span.gl-button-text{ class: @button_text_classes } = content + +- if link? + = link_to @href, { **@button_options, **base_attributes, class: button_class, target: @target, method: @method } do + = content_for :pajamas_button_content +- else + = content_tag 'button', { **@button_options, **base_attributes, class: button_class } do + = content_for :pajamas_button_content |