1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 13:10:17 +00:00
Files
browser/libs/angular/src/vault/components/spotlight/spotlight.component.ts
Oscar Hinton f3ff1e98ec Remove standalone true from vault (#15040)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 13:22:57 -07:00

34 lines
1.1 KiB
TypeScript

import { CommonModule } from "@angular/common";
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { ButtonModule, IconButtonModule, TypographyModule } from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common";
@Component({
selector: "bit-spotlight",
templateUrl: "spotlight.component.html",
imports: [ButtonModule, CommonModule, IconButtonModule, I18nPipe, TypographyModule],
})
export class SpotlightComponent {
// The title of the component
@Input({ required: true }) title: string | null = null;
// The subtitle of the component
@Input() subtitle?: string | null = null;
// The text to display on the button
@Input() buttonText?: string;
// Wheter the component can be dismissed, if true, the component will not show a close button
@Input() persistent = false;
// Optional icon to display on the button
@Input() buttonIcon: string | null = null;
@Output() onDismiss = new EventEmitter<void>();
@Output() onButtonClick = new EventEmitter();
handleButtonClick(event: MouseEvent): void {
this.onButtonClick.emit(event);
}
handleDismiss(): void {
this.onDismiss.emit();
}
}