padding: $spacing-05 $spacing-05 $spacing-03;
background-color: $layer-01;
position: sticky;
- top: 0;
z-index: 2;
- display: block;
+ inset-block-start: 3.6125rem;
}
.notification-timestamp {
border-bottom: 1px solid $border-subtle-01;
}
-:host {
- display: block;
- height: 100%;
- overflow-y: auto;
- background-color: $layer-01;
-}
<cds-button
kind="ghost"
size="sm"
+ class="notification-footer__view-all-button"
[routerLink]="['/notifications']"
(click)="closePanel($event)"
i18n>View all</cds-button>
@use '@carbon/styles/scss/theme';
.notification-footer {
+ position: sticky;
+ z-index: 2;
display: flex;
- justify-content: flex-start;
- padding: spacing.$spacing-03;
- border-top: 1px solid theme.$border-subtle-01;
-
- cds-button {
+ align-items: center;
+ background-color: theme.$layer-01;
+ block-size: 2.5rem;
+ border-block-start: 1px solid theme.$border-subtle-01;
+ inset-block-end: 0;
+ min-block-size: 2.5rem;
+ &__view-all-button {
color: theme.$text-primary;
-
- &:hover {
- color: theme.$link-primary;
- }
+ padding: spacing.$spacing-03 spacing.$spacing-05;
}
}
event.stopPropagation();
this.notificationService.toggleSidebar(false, true);
}
+
}
&__dismiss-btn {
color: theme.$text-primary;
}
-
}
cdsTheme="g10"
class="notification-panel__container"
hasScrollingContent="true"
+ (dismissAll)="handleDismissAll"
@panelAnimation>
<cds-modal-header
[showCloseButton]="true">
<cd-notification-header></cd-notification-header>
</cds-modal-header>
- <cd-notification-area></cd-notification-area>
- <cds-modal-footer>
- <cd-notification-footer></cd-notification-footer>
+ <cd-notification-area></cd-notification-area>
+ <cds-modal-footer *ngIf="showFooter">
+ <cd-notification-footer></cd-notification-footer>
</cds-modal-footer>
</cds-modal>
})
export class NotificationPanelComponent {
@Input() isPanelOpen: boolean = true;
+ showFooter = true;
constructor(public notificationService: NotificationService) {}
+
+ handleDismissAll() {
+ this.showFooter = false;
+ // TODO: Also hoide if there is afooter
+ }
}