1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 06:23:38 +00:00

tabs module improvements

This commit is contained in:
Vicki League
2025-06-25 17:02:55 -04:00
parent bb6324a9c3
commit f5daf48c53
3 changed files with 9 additions and 5 deletions

View File

@@ -11,14 +11,14 @@ import { Component, effect, HostBinding, input, signal } from "@angular/core";
export class TabBodyComponent {
private _firstRender = signal<boolean>(false);
readonly content = input<TemplatePortal>(undefined);
readonly content = input<TemplatePortal>();
readonly preserveContent = input(false);
@HostBinding("attr.hidden") get hidden() {
return !this.active() || null;
}
active = input<boolean>();
readonly active = input<boolean>();
constructor() {
effect(() => {

View File

@@ -32,7 +32,7 @@ export class TabComponent implements OnInit {
*
* @remarks See note 4 of https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
*/
readonly contentTabIndex = input<number | undefined>(undefined);
readonly contentTabIndex = input<number | undefined>();
@ViewChild(TemplateRef, { static: true }) implicitContent: TemplateRef<unknown>;
@ContentChild(TabLabelDirective) templateLabel: TabLabelDirective;

View File

@@ -44,14 +44,18 @@ export default {
component: TabGroupComponent,
decorators: [
moduleMetadata({
declarations: [
imports: [
CommonModule,
TabsModule,
ButtonModule,
FormFieldModule,
RouterModule,
ActiveDummyComponent,
ItemTwoDummyComponent,
ItemThreeDummyComponent,
ItemWithChildCounterDummyComponent,
DisabledDummyComponent,
],
imports: [CommonModule, TabsModule, ButtonModule, FormFieldModule, RouterModule],
}),
applicationConfig({
providers: [