mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 06:23:38 +00:00
tabs module improvements
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user