feat: 🎸 Add minimum refresh time to refresh button for sessions (#1077)

This commit is contained in:
Cameron Perera authored and GitHub committed 2022-04-28 16:35:46 -04:00
1 parent a7b3da2231
commit 01e4ec0a07
2 files changed
+4 -2

No files matched your search

@@ -2,6 +2,8 @@ import button from '../button/index';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { later } from '@ember/runloop';
export default class LoadingButton extends button {
// =actions
@@ -15,6 +17,6 @@ export default class LoadingButton extends button {
} catch (e) {
console.error('Error while loading data', e);
}
this.isLoading = false;
later(() => (this.isLoading = false), 1000);
}
}
@@ -5,6 +5,6 @@
vertical-align: middle;
margin: auto ($size-xs + $size-xxxs) auto auto;
&.is-loading {
color: var(--ui-gray-subtler-1);
color: var(--ui-gray-starker-1);
}
}