Skip to content

Commit

Permalink
refactor(ffe-buttons): reorganize code
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hellstrand committed Sep 5, 2024
1 parent ecb9fcd commit 6a6a74a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/ffe-buttons/less/base-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,24 @@

.ffe-button--loading {
pointer-events: none;

.ffe-button__label {
transform: translateY(-32px);
opacity: 0;
}

.ffe-button__spinner {
opacity: 1;
transform: none;
visibility: visible;
}
}

.ffe-button__label {
align-items: center;
display: flex;
transition: transform var(--ffe-transition-duration) var(--ffe-ease);
gap: var(--ffe-spacing-xs);
.ffe-button--loading & {
transform: translateY(-32px);
opacity: 0;
}
}

.ffe-button__spinner {
Expand All @@ -247,12 +254,6 @@
display: grid;
place-items: center;

.ffe-button--loading & {
opacity: 1;
transform: none;
visibility: visible;
}

&::after {
animation: 1s linear infinite button-loading-spin;
border: 3px solid currentcolor;
Expand Down

0 comments on commit 6a6a74a

Please sign in to comment.