Skip to content

Commit

Permalink
fix(button): loading button wasn't animating, updated svg in button-s…
Browse files Browse the repository at this point in the history
…pinner.js
  • Loading branch information
kajabi-bot committed Sep 30, 2024
1 parent 6673024 commit 0778b1d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/sage-system/lib/button-spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@ Sage.buttonSpinner = (function () {
// ==================================================

const SELECTOR_BUTTON_SPINNER_ON_SUBMIT = "data-js-sage-spinner-on-submit"
const BUTTON_LOADING_SPINNER = `<svg class='sage-loader__spinner sage-loader__spinner--loading-button' viewBox='25 25 50 50' aria-hidden='true'><circle class='sage-loader__spinner-path sage-loader__spinner-path--loading-button' cx='50' cy='50' r='20' fill='none' stroke='0072EF' stroke-width='4'></circle></svg>`;
const BUTTON_LOADING_SPINNER = `<svg class="sage-loader__spinner sage-loader__spinner--loading-button" viewBox="0 0 200 200" fill="none">
<defs>
<linearGradient id="sage-loader__spinner-secondHalf">
<stop offset="0%" stop-opacity="0" stop-color="currentColor" />
<stop offset="100%" stop-opacity="0.5" stop-color="currentColor" />
</linearGradient>
<linearGradient id="sage-loader__spinner-firstHalf">
<stop offset="0%" stop-opacity="1" stop-color="currentColor" />
<stop offset="100%" stop-opacity="0.5" stop-color="currentColor" />
</linearGradient>
</defs>
<g>
<path class="sage-loader__spinner-path sage-loader__spinner-secondHalf" d="M 4 100 A 96 96 0 0 1 196 100" />
<path class="sage-loader__spinner-path sage-loader__spinner-firstHalf" d="M 196 100 A 96 96 0 0 1 4 100" />
<path class="sage-loader__spinner-path sage-loader__spinner-highlight" d="M 4 100 A 96 96 0 0 1 4 98" />
</g>
</svg>`;

const ATTRIBUTE_ARIA_LABEL = 'aria-label';
const ATTRIBUTE_ARIA_BUSY = 'aria-busy';
Expand Down

0 comments on commit 0778b1d

Please sign in to comment.