1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 03:03:26 +00:00

Remove toggle component

This commit is contained in:
Mark Youssef
2025-10-14 10:47:42 -07:00
parent 86b7b96557
commit a130e14f9c
2 changed files with 1 additions and 33 deletions

View File

@@ -1,31 +0,0 @@
import { CommonModule } from "@angular/common";
import { Component } from "@angular/core";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { NavigationModule } from "@bitwarden/components";
@Component({
selector: "app-toggle-width",
template: `<bit-nav-item
text="Toggle Width"
icon="bwi-bug"
*ngIf="isDev"
(click)="toggleWidth()"
></bit-nav-item>`,
imports: [CommonModule, NavigationModule],
})
export class ToggleWidthComponent {
protected isDev: boolean;
constructor(platformUtilsService: PlatformUtilsService) {
this.isDev = platformUtilsService.isDev();
}
protected toggleWidth() {
if (document.body.style.minWidth === "unset") {
document.body.style.minWidth = "";
} else {
document.body.style.minWidth = "unset";
}
}
}

View File

@@ -4,12 +4,11 @@ import { Component, Input } from "@angular/core";
import { SideNavVariant, NavigationModule } from "@bitwarden/components";
import { ProductSwitcherModule } from "./product-switcher/product-switcher.module";
import { ToggleWidthComponent } from "./toggle-width.component";
@Component({
selector: "app-side-nav",
templateUrl: "web-side-nav.component.html",
imports: [CommonModule, NavigationModule, ProductSwitcherModule, ToggleWidthComponent],
imports: [CommonModule, NavigationModule, ProductSwitcherModule],
})
export class WebSideNavComponent {
@Input() variant: SideNavVariant = "primary";