Skip to content

Commit

Permalink
Merge pull request #70 from hirenchauhan2/add-skeleton-loader
Browse files Browse the repository at this point in the history
feat: add skeleton loader for modal connecting state
  • Loading branch information
rolznz authored Oct 3, 2023
2 parents 80e24cc + c56d743 commit 8be41d9
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/components/bc-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {withTwind} from './twind/withTwind';
import store from '../state/store';
import {html} from 'lit';
import {exitIcon} from './icons/exitIcon';
import {loadingIcon} from './icons/loadingIcon';
import {hr} from './templates/hr';
import './internal/bci-button';
import {classes} from './css/classes';
Expand All @@ -17,8 +16,25 @@ export class Start extends withTwind()(BitcoinConnectElement) {
class="flex flex-col justify-center items-center w-full font-sans"
>
${this._connecting
? html`<div class="py-28 ${classes['text-foreground']}">
${loadingIcon}
? html`<div
class="${classes['text-foreground']} w-full flex-1 animate-pulse"
>
<h1
class="w-1/2 h-7 mx-auto bg-gray-200 dark:bg-gray-700 rounded-md"
></h1>
<div
class="w-1/2 h-4 mt-8 mb-2 mx-auto bg-gray-200 dark:bg-gray-700 rounded-md"
></div>
<div
class="mb-12 h-10 w-1/2 mx-auto bg-gray-200 dark:bg-gray-700 rounded-md"
></div>
${hr()}
<div
class="my-4 h-4 w-1/2 mx-auto bg-gray-200 dark:bg-gray-700 rounded-md"
></div>
<div
class="h-10 w-1/2 mx-auto bg-gray-200 dark:bg-gray-700 rounded-md"
></div>
</div>`
: this._connected
? html` <h1 class="text-lg ${classes['text-neutral-secondary']}">
Expand Down Expand Up @@ -60,7 +76,7 @@ export class Start extends withTwind()(BitcoinConnectElement) {
How would you like to connect?
</h1>
<bc-connector-list />
<bc-connector-list></bc-connector-list>
`}
</div>`;
}
Expand Down

0 comments on commit 8be41d9

Please sign in to comment.