1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00
Files
browser/libs/components/src/drawer/drawer-header.component.ts
2025-10-21 18:52:40 +02:00

35 lines
986 B
TypeScript

import { CommonModule } from "@angular/common";
import { ChangeDetectionStrategy, Component, HostBinding, input } from "@angular/core";
import { I18nPipe } from "@bitwarden/ui-common";
import { IconButtonModule } from "../icon-button";
import { TypographyModule } from "../typography";
import { DrawerCloseDirective } from "./drawer-close.directive";
/**
* Header container for `bit-drawer`
**/
@Component({
selector: "bit-drawer-header",
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CommonModule, DrawerCloseDirective, TypographyModule, IconButtonModule, I18nPipe],
templateUrl: "drawer-header.component.html",
host: {
class: "tw-block tw-ps-4 tw-pe-2 tw-py-2",
},
})
export class DrawerHeaderComponent {
/**
* The title to display
*/
readonly title = input.required<string>();
/** We don't want to set the HTML title attribute with `this.title` */
@HostBinding("attr.title")
protected get getTitle(): null {
return null;
}
}