Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add skeleton loader for modal connecting state #70

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this too 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this when I ran npm run lint. The other error was in the test-file for my-component. I was not sure what do there hence did not fixed that.

`}
</div>`;
}
Expand Down