Skip to content

Commit

Permalink
fix(*): added the position sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush8923 committed Dec 23, 2024
1 parent 0566b50 commit 6534650
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/app/features/notification/notification.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,27 @@
<div class="notification-panel" (click)="$event.stopPropagation()">
<!-- stopPropagation above to avoid closing the panel upon action button clicks -->

<div
class="flex-row justify-space-between align-center notification-panel-header"
>
<h2 class="notification-title" i18n>Notifications</h2>

<button
mat-icon-button
[matMenuTriggerFor]="settingsMenu"
#settingsMenuTrigger="matMenuTrigger"
<div class="notification-list-header">
<div
class="flex-row justify-space-between align-center notification-panel-header"
>
<fa-icon icon="ellipsis"></fa-icon>
</button>
</div>
<h2 class="notification-title" i18n>Notifications</h2>

<!-- Tabs -->
<mat-tab-group [(selectedIndex)]="selectedTab">
<mat-tab label="All" i18n-label></mat-tab>
<mat-tab label="Unread" i18n-label></mat-tab>
</mat-tab-group>
<button
mat-icon-button
[matMenuTriggerFor]="settingsMenu"
#settingsMenuTrigger="matMenuTrigger"
>
<fa-icon icon="ellipsis"></fa-icon>
</button>
</div>

<!-- Tabs -->
<mat-tab-group [(selectedIndex)]="selectedTab">
<mat-tab label="All" i18n-label></mat-tab>
<mat-tab label="Unread" i18n-label></mat-tab>
</mat-tab-group>
</div>

<div class="flex-column gap-small">
@for (
Expand Down
6 changes: 6 additions & 0 deletions src/app/features/notification/notification.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@use "variables/colors";

.notification-list-header {
position: sticky;
top: 8px;
background-color: colors.$background;
}

.notification-title {
font-weight: 700;
margin: 0px;
Expand Down

0 comments on commit 6534650

Please sign in to comment.