1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-19 19:04:01 +00:00
Files
browser/libs/components/src/banner/banner.component.html
Oscar Hinton 70d10c7a7f [CL-932] Migrate banner component to OnPush & Signals (#17387)
Migrates the BannerComponent to use computed signals and OnPush.
2026-02-17 09:24:27 -08:00

26 lines
951 B
HTML

<div
class="tw-flex tw-items-center tw-gap-4 tw-p-2 tw-ps-4 tw-text-main tw-border-transparent tw-bg-clip-padding tw-border-solid tw-border-b tw-border-0"
[class]="bannerClass()"
[attr.role]="useAlertRole() ? 'status' : null"
[attr.aria-live]="useAlertRole() ? 'polite' : null"
>
@if (displayIcon(); as icon) {
<i class="bwi tw-align-middle tw-text-base" [class]="icon" aria-hidden="true"></i>
}
<!-- Overriding focus-visible color for link buttons for a11y against colored background -->
<span class="tw-grow tw-text-base [&>button[bitlink]:focus-visible:before]:!tw-ring-text-main">
<ng-content></ng-content>
</span>
<!-- Overriding hover and focus-visible colors for a11y against colored background -->
@if (showClose()) {
<button
type="button"
bitIconButton="bwi-close"
buttonType="main"
size="small"
(click)="onClose.emit()"
[label]="'close' | i18n"
></button>
}
</div>