1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-30 15:13:32 +00:00

[CL-17] Tabs - Router (#2952)

* [CL-17] Tabs - Routing

* Updated titles

* Revision changes

* Replaced testing module to achieve active default state

* Z-index for tab vs disabled

* Revision changes

* Updated z index on focus

* Fixed background color of selected tab

* Force text colors in-case bootstrap tries to override

* Remove unecessary css rules, fix tabs moving when active

Co-authored-by: Hinton <hinton@users.noreply.github.com>
This commit is contained in:
Vincent Salucci
2022-07-18 09:17:31 -05:00
committed by GitHub
parent 23bf69c733
commit 5ef3aac5e2
9 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<ng-container [ngSwitch]="disabled">
<a
*ngSwitchCase="false"
role="tab"
[class]="baseClassList"
[routerLink]="route"
[routerLinkActive]="activeClassList"
#rla="routerLinkActive"
[attr.aria-selected]="rla.isActive"
>
<ng-container [ngTemplateOutlet]="content"></ng-container>
</a>
<button
*ngSwitchCase="true"
type="button"
role="tab"
[class]="baseClassList"
disabled
aria-disabled="true"
>
<ng-container [ngTemplateOutlet]="content"></ng-container>
</button>
</ng-container>
<ng-template #content>
<ng-content></ng-content>
</ng-template>