2022-08-27 11:52:29 +05:30
|
|
|
= content_for :pajamas_button_content, flush: true do
|
2022-07-23 23:45:48 +05:30
|
|
|
- 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
|
2022-08-27 11:52:29 +05:30
|
|
|
|
|
|
|
- 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
|