Skip to content

Commit ee250e3

Browse files
Merge pull request #58 from AnguHashBlog/main
minor adjustments
2 parents 9d8c53e + 3279d21 commit ee250e3

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

angular-primeng-app/src/app/app.component.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<router-outlet />
44
</div>
55
<app-footer />
6+
67
@if (showScrollButton) {
7-
<p-button class="pageUpButton" (click)="scrollToTop()" icon="pi pi-angle-up" [rounded]="true" size="small"></p-button>
8-
}
8+
<p-button class="scroll-btn" (click)="scrollToTop()" icon="pi pi-angle-up" [rounded]="true" size="small"></p-button>
9+
}

angular-primeng-app/src/app/app.component.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
width: 100%;
77
}
88

9-
.pageUpButton {
9+
.scroll-btn {
1010
position: fixed;
11-
bottom: 10px;
12-
right: 14px;
11+
bottom: 1rem;
12+
right: 1rem;
1313
}
1414

angular-primeng-app/src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class AppComponent implements OnInit, OnDestroy {
5858
@HostListener('window:scroll', [])
5959
onWindowScroll() {
6060
const yOffset = window.pageYOffset || document.documentElement.scrollTop;
61-
if (yOffset > 300) {
61+
if (yOffset > 500) {
6262
this.showScrollButton = true;
6363
} else {
6464
this.showScrollButton = false;

0 commit comments

Comments
 (0)