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 button spinner to register button #76

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions apps/frontend/src/app/features/register/register.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@if (isLoading) {
<app-loading aria-live="polite" aria-label="Loading..."></app-loading>
} @else { @if (hasError) {
@if (hasError) {
<app-error
[title]="'Error occurred'"
[message]="this.errorMessage"
Expand Down Expand Up @@ -135,7 +133,9 @@ <h1 class="font-bold">Your public and secret keys</h1>
'bg-indigo-600 hover:bg-indigo-700': publicKey && secretKey
}"
>
Register
@if (isLoading){
<app-button-spinner />
}@else{ Register }
</button>
</div>
</form>
Expand All @@ -159,4 +159,4 @@ <h1 class="font-bold">Your public and secret keys</h1>
</p>
</div>
</div>
} }
}
2 changes: 2 additions & 0 deletions apps/frontend/src/app/features/register/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Router, RouterLink } from '@angular/router'
import { ErrorComponent } from '../../shared/feedback/error/error.component'
import { LoadingComponent } from '../../shared/feedback/loading/loading.component'
import { SuccessComponent } from '../../shared/feedback/success/success.component'
import { ButtonSpinnerComponent } from '../../shared/feedback/button-spinner/button-spinner.component'

@Component({
selector: 'app-register',
Expand All @@ -25,6 +26,7 @@ import { SuccessComponent } from '../../shared/feedback/success/success.componen
SuccessComponent,
NgOptimizedImage,
RouterLink,
ButtonSpinnerComponent,
],
templateUrl: './register.component.html',
styleUrls: ['./register.component.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<svg
class="animate-spin -ml-1 mr-3 h-5 w-5 text-white"
class="animate-spin h-5 w-5 text-white"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
Expand Down
Loading