Skip to content

Commit

Permalink
Use a shoelace spinner as loading state
Browse files Browse the repository at this point in the history
  • Loading branch information
oyamauchi committed Sep 15, 2023
1 parent cb164d1 commit 2c95c20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/state-calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ import {
} from './utility-selector';
import { iconTabBarStyles } from './icon-tab-bar';

import '@shoelace-style/shoelace/dist/components/spinner/spinner';

const loadingTemplate = () => html`
<div class="card card-content">Loading...</div>
<div class="card card-content">
<div class="loading">
<sl-spinner></sl-spinner>
</div>
</div>
`;

const errorTemplate = (error: unknown) => html`
Expand Down
5 changes: 5 additions & 0 deletions src/state-incentive-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { PROJECTS, Project, shortLabel } from './projects';
import { iconTabBarTemplate } from './icon-tab-bar';

export const stateIncentivesStyles = css`
.loading {
text-align: center;
font-size: 2rem;
}
.incentive {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 2c95c20

Please sign in to comment.