1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 20:24:01 +00:00

finish migrating toast module

This commit is contained in:
Vicki League
2025-06-24 15:38:49 -04:00
parent c92479fda9
commit 7c0c616d6f
2 changed files with 3 additions and 6 deletions

View File

@@ -8,7 +8,7 @@
<i aria-hidden="true" class="bwi tw-text-xl tw-py-1.5 tw-px-2.5 {{ iconClass }}"></i>
<div>
<span class="tw-sr-only">{{ variant() | i18n }}</span>
@if (title) {
@if (title(); as title) {
<p data-testid="toast-title" class="tw-font-semibold tw-mb-0">{{ title }}</p>
}
@for (m of messageArray; track m) {

View File

@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, Output, input } from "@angular/core";
import { Component, EventEmitter, Output, input } from "@angular/core";
import { IconButtonModule } from "../icon-button";
import { SharedModule } from "../shared";
@@ -41,10 +41,7 @@ export class ToastComponent {
readonly message = input.required<string | string[]>();
/** An optional title to display over the message. */
// TODO: Skipped for migration because:
// This input is used in a control flow expression (e.g. `@if` or `*ngIf`)
// and migrating would break narrowing currently.
@Input() title?: string;
title = input<string>();
/**
* The percent width of the progress bar, from 0-100