1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 10:33:31 +00:00
Files
browser/libs/components/src/navigation/nav-logo.component.html
Oscar Hinton d64db8fbf5 [CL-904] Migrate CL/Navigation to use OnPush (#16958)
* Migrate CL/Navigation to use OnPush

* Modernize the code

* Swap to signals and class

* Further tweaks

* Remove this.

* Replace setOpen and setClose with a public signal

* fix merge issues and signal-ifying service

* fix class and style bindings

* fix accidental behavior change from merge conflicts

* fix redundant check

* fix missed ngClass

* fix comment

* Re-add share ng-template

---------

Co-authored-by: Vicki League <vleague@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 11:44:16 -05:00

22 lines
869 B
HTML

<div
class="tw-px-2 tw-pt-2"
[class]="
sideNavService.open()
? 'tw-sticky tw-top-0 tw-z-50 tw-pb-4'
: 'tw-pb-[calc(theme(spacing.8)_+_2px)]'
"
>
<!-- absolutely position the link svg to avoid shifting layout when sidenav is closed -->
<a
[routerLink]="route()"
class="tw-relative tw-p-3 tw-block tw-rounded-md tw-bg-bg-sidenav tw-outline-none focus-visible:tw-ring focus-visible:tw-ring-inset focus-visible:tw-ring-border-focus hover:tw-bg-bg-sidenav-item-hover tw-h-[73px] [&_svg]:tw-absolute [&_svg]:tw-inset-[.6875rem] [&_svg]:tw-w-[200px]"
[class]="!sideNavService.open() ? '!tw-h-[55px] [&_svg]:!tw-w-[26px]' : ''"
[attr.aria-label]="label()"
[title]="label()"
routerLinkActive
ariaCurrentWhenActive="page"
>
<bit-icon [icon]="sideNavService.open() ? openIcon() : closedIcon()"></bit-icon>
</a>
</div>