Skip to content

Commit 60e4ced

Browse files
committed
loading-spinner: Set spinner color to dark for certain buttons
Most spinners are either outside the button or inside a button whose background changes accordingly with the color mode. However, there are some buttons whose background color doesn't change with the color mode. For those buttons that don't follow the color mode, we would like their spinner color to be dark.
1 parent 08c3588 commit 60e4ced

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

app/components/follow-button.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{on "click" (perform this.toggleFollowTask)}}
1212
>
1313
{{#if (or this.followStateTask.isRunning this.toggleFollowTask.isRunning)}}
14-
<LoadingSpinner data-test-spinner />
14+
<LoadingSpinner class="dark" data-test-spinner />
1515
{{else}}
1616
{{#if this.following}}
1717
Unfollow

app/components/loading-spinner.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
height: var(--spinner-size);
88
width: var(--spinner-size);
99

10+
&:global(.dark) {
11+
--spinner-bg-color: rgba(0, 0, 0, .2);
12+
}
13+
1014
&:after {
1115
content: " ";
1216
display: block;

app/templates/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
>
5252
Try Again
5353
{{#if this.dataTask.isRunning}}
54-
<LoadingSpinner local-class="spinner" data-test-spinner />
54+
<LoadingSpinner class="dark" local-class="spinner" data-test-spinner />
5555
{{/if}}
5656
</button>
5757
{{else}}

app/templates/settings/tokens/new.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
Generate Token
183183

184184
{{#if this.saveTokenTask.isRunning}}
185-
<LoadingSpinner local-class="spinner" data-test-spinner />
185+
<LoadingSpinner class="dark" local-class="spinner" data-test-spinner />
186186
{{/if}}
187187
</button>
188188

0 commit comments

Comments
 (0)